cheind / image-align

Variants of the classic Lucas-Kanade image alignment algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documents/L-K/image-align/tests/catch.hpp:875:17: error: ‘nullptr_t’ in namespace ‘std’ does not name a type

YYimingWang opened this issue · comments

hello,my environment is:
(1)ubuntu 16.04
(2)gcc 5.4
(3)opencv3.4
when i input the command "make",the output is as follows:
In file included from /home/moonx/Documents/L-K/image-align/tests/warp.cpp:21:0: /home/moonx/Documents/L-K/image-align/tests/catch.hpp:875:17: error: ‘nullptr_t’ in namespace ‘std’ does not name a type inline std::nullptr_t opCast(std::nullptr_t) { return nullptr; } ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:996:58: error: ‘template<Catch::Internal::Operator Op, class T> bool Catch::Internal::compare’ conflicts with a previous declaration template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:990:44: note: previous declaration ‘namespace Catch::Internal { }::compare’ template<Operator Op, typename T> bool compare( T* lhs, int rhs ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:996:53: error: ‘nullptr_t’ is not a member of ‘std’ template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:996:70: error: expected primary-expression before ‘*’ token template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:996:72: error: ‘rhs’ was not declared in this scope template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:996:76: error: expression list treated as compound expression in initializer [-fpermissive] template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:996:78: error: expected ‘;’ before ‘{’ token template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:999:66: error: ‘std::nullptr_t’ has not been declared template<Operator Op, typename T> bool compare( T* lhs, std::nullptr_t ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:999:44: error: redefinition of ‘template<Catch::Internal::Operator Op, class T> bool Catch::Internal::compare(T*, int)’ template<Operator Op, typename T> bool compare( T* lhs, std::nullptr_t ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:990:44: note: ‘template<Catch::Internal::Operator Op, class T> bool Catch::Internal::compare(T*, int)’ previously declared here template<Operator Op, typename T> bool compare( T* lhs, int rhs ) { ^ In file included from /home/moonx/Documents/L-K/image-align/tests/warp.cpp:21:0: /home/moonx/Documents/L-K/image-align/tests/catch.hpp:1099:38: error: ‘std::__cxx11::string Catch::toString’ redeclared as different kind of symbol std::string toString( std::nullptr_t ); ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:1096:13: note: previous declaration ‘std::__cxx11::string Catch::toString(unsigned char)’ std::string toString( unsigned char value ); ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:1099:23: error: ‘nullptr_t’ is not a member of ‘std’ std::string toString( std::nullptr_t ); ^ In file included from /home/moonx/Documents/L-K/image-align/tests/warp.cpp:21:0: /home/moonx/Documents/L-K/image-align/tests/catch.hpp:7351:38: error: ‘std::__cxx11::string Catch::toString’ redeclared as different kind of symbol std::string toString( std::nullptr_t ) { ^ In file included from /home/moonx/Documents/L-K/image-align/tests/warp.cpp:21:0: /home/moonx/Documents/L-K/image-align/tests/catch.hpp:1222:13: note: previous declaration ‘template<class T, class Allocator> std::__cxx11::string Catch::toString(const std::vector<_Tp, _Alloc>&)’ std::string toString( std::vector<T,Allocator> const& v ) { ^ In file included from /home/moonx/Documents/L-K/image-align/tests/warp.cpp:21:0: /home/moonx/Documents/L-K/image-align/tests/catch.hpp:7351:23: error: ‘nullptr_t’ is not a member of ‘std’ std::string toString( std::nullptr_t ) { ^ CMakeFiles/tests.dir/build.make:62: recipe for target 'CMakeFiles/tests.dir/tests/warp.cpp.o' failed make[2]: *** [CMakeFiles/tests.dir/tests/warp.cpp.o] Error 1 CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/tests.dir/all' failed make[1]: *** [CMakeFiles/tests.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
can you give me a hand about this problem?thank you very much!

Please try to update to a more recent GCC