Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phalanx: fix for gcc 15 #13434

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
Loading