You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SparseGridTest.cpp is missing the include of the algorithm header from the STL. When compiling on gentoo with recent gtest (1.10) it produces the following error:
FAILED: CMakeFiles/SparseGridTest.dir/tests/utils/SparseGridTest.cpp.o
/usr/bin/x86_64-pc-linux-gnu-g++ -DARCUS -DBUILD_TESTS -DBUILD_TESTS=1 -I/usr/include/polyclipping -I. -march=native -O2 -pipe -frecord-gcc-switches -O3 -DNDEBUG -Wall -fopenmp -std=gnu++11 -MD -MT CMakeFiles/SparseGridTest.dir/tests/utils/SparseGridTest.cpp.o -MF CMakeFiles/SparseGridTest.dir/tests/utils/SparseGridTest.cpp.o.d -o CMakeFiles/SparseGridTest.dir/tests/utils/SparseGridTest.cpp.o -c /var/tmp/portage/media-gfx/curaengine-4.6.1-r1/work/CuraEngine-4.6.1/tests/utils/SparseGridTest.cpp
In file included from /usr/include/gtest/gtest.h:387,
from /var/tmp/portage/media-gfx/curaengine-4.6.1-r1/work/CuraEngine-4.6.1/tests/utils/SparseGridTest.cpp:4:
/var/tmp/portage/media-gfx/curaengine-4.6.1-r1/work/CuraEngine-4.6.1/tests/utils/SparseGridTest.cpp: In member function 'virtual void cura::GetNearbyTest_GetNearby_Test::TestBody()':
/var/tmp/portage/media-gfx/curaengine-4.6.1-r1/work/CuraEngine-4.6.1/tests/utils/SparseGridTest.cpp:48:38: error: 'find_if' is not a member of 'std'; did you mean 'find'?
48 | EXPECT_NE(result.end(), std::find_if(result.begin(), result.end(), [&point](const typename SparsePointGridInclusive<Point>::Elem &elem) { return elem.val == point; }))
| ^~~~~~~
/var/tmp/portage/media-gfx/curaengine-4.6.1-r1/work/CuraEngine-4.6.1/tests/utils/SparseGridTest.cpp:54:38: error: 'find_if' is not a member of 'std'; did you mean 'find'?
54 | EXPECT_EQ(result.end(), std::find_if(result.begin(), result.end(), [&point](const typename SparsePointGridInclusive<Point>::Elem &elem) { return elem.val == point; }))
| ^~~~~~~
/var/tmp/portage/media-gfx/curaengine-4.6.1-r1/work/CuraEngine-4.6.1/tests/utils/SparseGridTest.cpp: In member function 'virtual void cura::GetNearbyTest_getNearbyLine2_Test::TestBody()':
/var/tmp/portage/media-gfx/curaengine-4.6.1-r1/work/CuraEngine-4.6.1/tests/utils/SparseGridTest.cpp:99:38: error: 'find_if' is not a member of 'std'; did you mean 'find'?
99 | EXPECT_NE(result.end(), std::find_if(result.begin(), result.end(), [&point](const typename SparsePointGridInclusive<Point>::Elem &elem) { return elem.val == point; }))
| ^~~~~~~
/var/tmp/portage/media-gfx/curaengine-4.6.1-r1/work/CuraEngine-4.6.1/tests/utils/SparseGridTest.cpp:105:38: error: 'find_if' is not a member of 'std'; did you mean 'find'?
105 | EXPECT_EQ(result.end(), std::find_if(result.begin(), result.end(), [&point](const typename SparsePointGridInclusive<Point>::Elem &elem) { return elem.val == point; }))
| ^~~~~~~
/var/tmp/portage/media-gfx/curaengine-4.6.1-r1/work/CuraEngine-4.6.1/tests/utils/SparseGridTest.cpp: In member function 'virtual void cura::GetNearbyTest_getNearbyLine_Test::TestBody()':
/var/tmp/portage/media-gfx/curaengine-4.6.1-r1/work/CuraEngine-4.6.1/tests/utils/SparseGridTest.cpp:144:38: error: 'find_if' is not a member of 'std'; did you mean 'find'?
144 | EXPECT_NE(result.end(), std::find_if(result.begin(), result.end(), [&point](const typename SparsePointGridInclusive<Point>::Elem &elem) { return elem.val == point; }))
| ^~~~~~~
/var/tmp/portage/media-gfx/curaengine-4.6.1-r1/work/CuraEngine-4.6.1/tests/utils/SparseGridTest.cpp:150:38: error: 'find_if' is not a member of 'std'; did you mean 'find'?
150 | EXPECT_EQ(result.end(), std::find_if(result.begin(), result.end(), [&point](const typename SparsePointGridInclusive<Point>::Elem &elem) { return elem.val == point; }))
| ^~~~~~~
ninja: build stopped: subcommand failed.
* ERROR: media-gfx/curaengine-4.6.1-r1::testworld failed (compile phase):
After adding +#include <algorithm> to SparseGridTest.cpp everything works fine.
The SparseGridTest.cpp is missing the include of the algorithm header from the STL. When compiling on gentoo with recent gtest (1.10) it produces the following error:
After adding
+#include <algorithm>
to SparseGridTest.cpp everything works fine.See Standard Template Library: Algorithms
and std:find
The text was updated successfully, but these errors were encountered: