Skip to content

Commit

Permalink
Merge Pull Request #13434 from rppawlo/Trilinos/phalanx-fix-gcc-15
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: b'Phalanx: fix for gcc 15'
PR Author: rppawlo
  • Loading branch information
trilinos-autotester committed Sep 9, 2024
2 parents 7bcf457 + 3b416e8 commit 10d9685
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/phalanx/src/Phalanx_TemplateIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace PHX {

//! Equal operator
bool operator==(const TemplateIterator& t) const {
return object_iterator == t.objectIterator;
return object_iterator == t.object_iterator;
}

//! Not equal operator
Expand Down Expand Up @@ -128,7 +128,7 @@ namespace PHX {

//! Equal operator
bool operator==(const ConstTemplateIterator& t) const {
return object_iterator == t.objectIterator;
return object_iterator == t.object_iterator;
}

//! Not equal operator
Expand Down
26 changes: 25 additions & 1 deletion packages/phalanx/test/TemplateManager/TemplateManagerTest.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @HEADER
// *****************************************************************************
// Phalanx: A Partial Differential Equation Field Evaluation
// Phalanx: A Partial Differential Equation Field Evaluation
// Kernel for Flexible Management of Complex Dependency Chains
//
// Copyright 2008 NTESS and the Phalanx contributors.
Expand Down Expand Up @@ -58,3 +58,27 @@ TEUCHOS_UNIT_TEST(template_manager_test, basic)
auto r2 = tm.getAsObject<R>();
TEST_ASSERT(r2.is_null());
}

TEUCHOS_UNIT_TEST(template_manager_test, iterator_ops)
{
using namespace PHX;
DummyTemplateManager<MyTraits> tm;

auto start = tm.begin();
auto start_again = tm.begin();
auto end = tm.end();

TEST_ASSERT(start == start_again);
TEST_ASSERT(start != end);

++start;
TEST_ASSERT(start != start_again);

start_again++;
TEST_ASSERT(start == start_again);

++start;
start_again++;
TEST_ASSERT(start == end);
TEST_ASSERT(start_again == end);
}

0 comments on commit 10d9685

Please sign in to comment.