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

Can't compile tongrams #12

Closed
pedro-alonsod opened this issue Nov 27, 2019 · 3 comments
Closed

Can't compile tongrams #12

pedro-alonsod opened this issue Nov 27, 2019 · 3 comments

Comments

@pedro-alonsod
Copy link

Hi I get an error when trying to compile the code:

In file included from /SSD/pedros-corner/tongrams/include/utils/util.hpp:19:0, from /SSD/pedros-corner/tongrams/test/test_count_model.cpp:3: /SSD/pedros-corner/tongrams/include/../external/essentials/include/essentials.hpp: In member function ‘typename std::enable_if<std::is_pod<_Tp>::value>::type essentials::sizer::visit(T&)’: /SSD/pedros-corner/tongrams/include/../external/essentials/include/essentials.hpp:361:62: error: must #include <typeinfo> before using typeid node n(pod_bytes(val), m_current->depth + 1, typeid(T).name()); ^ /SSD/pedros-corner/tongrams/include/../external/essentials/include/essentials.hpp: In member function ‘typename std::enable_if<std::is_pod<_Tp>::value>::type essentials::sizer::visit(std::vector<_RealType>&)’: /SSD/pedros-corner/tongrams/include/../external/essentials/include/essentials.hpp:374:37: error: must #include <typeinfo> before using typeid typeid(std::vector<T>).name()); ^ /SSD/pedros-corner/tongrams/include/../external/essentials/include/essentials.hpp: In member function ‘typename std::enable_if<(! std::is_pod<_Tp>::value)>::type essentials::sizer::visit(std::vector<_RealType>&)’: /SSD/pedros-corner/tongrams/include/../external/essentials/include/essentials.hpp:385:50: error: must #include <typeinfo> before using typeid node n(0, parent->depth + 1, typeid(T).name()); ^ /SSD/pedros-corner/tongrams/include/../external/essentials/include/essentials.hpp: In function ‘void essentials::print_size(Data&)’: /SSD/pedros-corner/tongrams/include/../external/essentials/include/essentials.hpp:437:30: error: must #include <typeinfo> before using typeid sizer visitor(typeid(Data).name()); ^ In file included from /SSD/pedros-corner/tongrams/test/test_count_model.cpp:6:0: /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp: At global scope: /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:13:45: error: ‘empty’ declared as an ‘inline’ field inline static const std::string empty = ""; ^ /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:13:45: error: in-class initialization of static data member ‘const string cmd_line_parser::parser::empty’ of non-literal type /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:13:45: error: call to non-constexpr function ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp: In member function ‘T cmd_line_parser::parser::parse(const string&) const’: /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:115:12: error: expected ‘(’ before ‘constexpr’ if constexpr (std::is_same<T, std::string>::value) { ^ /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:117:11: error: ‘else’ without a previous ‘if’ } else if constexpr (std::is_same<T, char>::value or std::is_same<T, signed char>::value or ^ /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:117:19: error: expected ‘(’ before ‘constexpr’ } else if constexpr (std::is_same<T, char>::value or std::is_same<T, signed char>::value or ^ /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:120:11: error: ‘else’ without a previous ‘if’ } else if constexpr (std::is_same<T, unsigned int>::value or std::is_same<T, int>::value or ^ /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:120:19: error: expected ‘(’ before ‘constexpr’ } else if constexpr (std::is_same<T, unsigned int>::value or std::is_same<T, int>::value or ^ /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:124:11: error: ‘else’ without a previous ‘if’ } else if constexpr (std::is_same<T, unsigned long int>::value or ^ /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:124:19: error: expected ‘(’ before ‘constexpr’ } else if constexpr (std::is_same<T, unsigned long int>::value or ^ /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:129:11: error: ‘else’ without a previous ‘if’ } else if constexpr (std::is_same<T, float>::value or std::is_same<T, double>::value or ^ /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:129:19: error: expected ‘(’ before ‘constexpr’ } else if constexpr (std::is_same<T, float>::value or std::is_same<T, double>::value or ^ /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:132:11: error: ‘else’ without a previous ‘if’ } else if constexpr (std::is_same<T, bool>::value) { ^ /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:132:19: error: expected ‘(’ before ‘constexpr’ } else if constexpr (std::is_same<T, bool>::value) { ^ /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:144:5: error: expected ‘}’ at end of input } ^ /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp: In instantiation of ‘T cmd_line_parser::parser::parse(const string&) const [with T = std::__cxx11::basic_string<char>; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:104:24: required from ‘T cmd_line_parser::parser::get(const string&) const [with T = std::__cxx11::basic_string<char>; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /SSD/pedros-corner/tongrams/test/test_count_model.cpp:40:69: required from here /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:144:5: warning: no return statement in function returning non-void [-Wreturn-type] /SSD/pedros-corner/tongrams/test/../external/cmd_line_parser/include/parser.hpp:114:32: warning: unused parameter ‘value’ [-Wunused-parameter] T parse(std::string const& value) const { ^ CMakeFiles/test_count_model.dir/build.make:62: recipe for target 'CMakeFiles/test_count_model.dir/test/test_count_model.cpp.o' failed make[2]: *** [CMakeFiles/test_count_model.dir/test/test_count_model.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/test_count_model.dir/all' failed make[1]: *** [CMakeFiles/test_count_model.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

I'm not sure why this is happening. Is on Ubuntu 16.04, a server. Any ideas?. Thanks.

@jermp
Copy link
Owner

jermp commented Nov 27, 2019

Hi, it seems a problem relative to the external library
https://github.com/jermp/cmd_line_parser
which requires C++17 for "if constexpr".
Are you compiling with C++17 ?
Can you try to compile the cmd_line_parser standalone?

@pedro-alonsod
Copy link
Author

No, also not:
(base) pedalo@B4375:~/Documents/GithubCode/cmd_line_parser/src/build$ cmake .. -- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- CMAKE_BUILD_TYPE: Release -- Configuring done -- Generating done -- Build files have been written to: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/build (base) pedalo@B4375:~/Documents/GithubCode/cmd_line_parser/src/build$ make Scanning dependencies of target test_parse [ 25%] Building CXX object CMakeFiles/test_parse.dir/test_parse.cpp.o In file included from /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:4:0: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:13:45: error: ‘empty’ declared as an ‘inline’ field inline static const std::string empty = ""; ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:13:45: error: in-class initialization of static data member ‘const string cmd_line_parser::parser::empty’ of non-literal type /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:13:45: error: call to non-constexpr function ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp: In member function ‘T cmd_line_parser::parser::parse(const string&) const’: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:115:12: error: expected ‘(’ before ‘constexpr’ if constexpr (std::is_same<T, std::string>::value) { ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:117:11: error: ‘else’ without a previous ‘if’ } else if constexpr (std::is_same<T, char>::value or std::is_ ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:117:19: error: expected ‘(’ before ‘constexpr’ } else if constexpr (std::is_same<T, char>::value or std::is_ ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:120:11: error: ‘else’ without a previous ‘if’ } else if constexpr (std::is_same<T, unsigned int>::value or ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:120:19: error: expected ‘(’ before ‘constexpr’ } else if constexpr (std::is_same<T, unsigned int>::value or ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:124:11: error: ‘else’ without a previous ‘if’ } else if constexpr (std::is_same<T, unsigned long int>::valu ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:124:19: error: expected ‘(’ before ‘constexpr’ } else if constexpr (std::is_same<T, unsigned long int>::valu ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:129:11: error: ‘else’ without a previous ‘if’ } else if constexpr (std::is_same<T, float>::value or std::is ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:129:19: error: expected ‘(’ before ‘constexpr’ } else if constexpr (std::is_same<T, float>::value or std::is ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:132:11: error: ‘else’ without a previous ‘if’ } else if constexpr (std::is_same<T, bool>::value) { ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:132:19: error: expected ‘(’ before ‘constexpr’ } else if constexpr (std::is_same<T, bool>::value) { ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:144:5: error: expected ‘}’ at end of input } ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp: In instantiation of ‘T cmd_line_parser::parser::parse(const string&) const [with T = char; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:21:9: required from ‘void test(const cmd_line_parser::parser&, const string&) [with T = char; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:27:27: required from here /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:144:5: warning: no return statement in function returning non-void [-Wreturn-type] /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:114:32: warning: unused parameter ‘value’ [-Wunused-parameter] T parse(std::string const& value) const { ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp: In instantiation of ‘T cmd_line_parser::parser::parse(const string&) const [with T = signed char; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:21:9: required from ‘void test(const cmd_line_parser::parser&, const string&) [with T = signed char; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:28:34: required from here /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:144:5: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:114:32: warning: unused parameter ‘value’ [-Wunused-parameter] T parse(std::string const& value) const { ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp: In instantiation of ‘T cmd_line_parser::parser::parse(const string&) const [with T = unsigned char; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:21:9: required from ‘void test(const cmd_line_parser::parser&, const string&) [with T = unsigned char; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:29:36: required from here /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:144:5: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:114:32: warning: unused parameter ‘value’ [-Wunused-parameter] T parse(std::string const& value) const { ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp: In instantiation of ‘T cmd_line_parser::parser::parse(const string&) const [with T = short int; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:21:9: required from ‘void test(const cmd_line_parser::parser&, const string&) [with T = short int; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:31:36: required from here /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:144:5: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:114:32: warning: unused parameter ‘value’ [-Wunused-parameter] T parse(std::string const& value) const { ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp: In instantiation of ‘T cmd_line_parser::parser::parse(const string&) const [with T = int; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:21:9: required from ‘void test(const cmd_line_parser::parser&, const string&) [with T = int; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:32:31: required from here /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:144:5: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:114:32: warning: unused parameter ‘value’ [-Wunused-parameter] T parse(std::string const& value) const { ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp: In instantiation of ‘T cmd_line_parser::parser::parse(const string&) const [with T = long int; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:21:9: required from ‘void test(const cmd_line_parser::parser&, const string&) [with T = long int; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:33:38: required from here /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:144:5: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:114:32: warning: unused parameter ‘value’ [-Wunused-parameter] T parse(std::string const& value) const { ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp: In instantiation of ‘T cmd_line_parser::parser::parse(const string&) const [with T = short unsigned int; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:21:9: required from ‘void test(const cmd_line_parser::parser&, const string&) [with T = short unsigned int; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:35:44: required from here /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:144:5: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:114:32: warning: unused parameter ‘value’ [-Wunused-parameter] T parse(std::string const& value) const { ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp: In instantiation of ‘T cmd_line_parser::parser::parse(const string&) const [with T = unsigned int; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:21:9: required from ‘void test(const cmd_line_parser::parser&, const string&) [with T = unsigned int; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:36:38: required from here /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:144:5: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:114:32: warning: unused parameter ‘value’ [-Wunused-parameter] T parse(std::string const& value) const { ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp: In instantiation of ‘T cmd_line_parser::parser::parse(const string&) const [with T = long unsigned int; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:21:9: required from ‘void test(const cmd_line_parser::parser&, const string&) [with T = long unsigned int; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:37:50: required from here /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:144:5: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:114:32: warning: unused parameter ‘value’ [-Wunused-parameter] T parse(std::string const& value) const { ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp: In instantiation of ‘T cmd_line_parser::parser::parse(const string&) const [with T = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:21:9: required from ‘void test(const cmd_line_parser::parser&, const string&) [with T = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:39:32: required from here /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:144:5: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:114:32: warning: unused parameter ‘value’ [-Wunused-parameter] T parse(std::string const& value) const { ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp: In instantiation of ‘T cmd_line_parser::parser::parse(const string&) const [with T = double; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:21:9: required from ‘void test(const cmd_line_parser::parser&, const string&) [with T = double; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:40:32: required from here /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:144:5: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:114:32: warning: unused parameter ‘value’ [-Wunused-parameter] T parse(std::string const& value) const { ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp: In instantiation of ‘T cmd_line_parser::parser::parse(const string&) const [with T = long double; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:21:9: required from ‘void test(const cmd_line_parser::parser&, const string&) [with T = long double; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:41:41: required from here /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:144:5: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:114:32: warning: unused parameter ‘value’ [-Wunused-parameter] T parse(std::string const& value) const { ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp: In instantiation of ‘T cmd_line_parser::parser::parse(const string&) const [with T = bool; std::__cxx11::string = std::__cxx11::basic_string<char>]’: /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:21:9: required from ‘void test(const cmd_line_parser::parser&, const string&) [with T = bool; std::__cxx11::string = std::__cxx11::basic_string<char>]’ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/test_parse.cpp:43:30: required from here /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:144:5: warning: no return statement in function returning non-void [-Wreturn-type] } ^ /nfs/staff/pedalo/Documents/GithubCode/cmd_line_parser/src/../include/parser.hpp:114:32: warning: unused parameter ‘value’ [-Wunused-parameter] T parse(std::string const& value) const { ^ CMakeFiles/test_parse.dir/build.make:62: recipe for target 'CMakeFiles/test_parse.dir/test_parse.cpp.o' failed make[2]: *** [CMakeFiles/test_parse.dir/test_parse.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/test_parse.dir/all' failed make[1]: *** [CMakeFiles/test_parse.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
So I need to update the GNU or any other suggestion?

@jermp
Copy link
Owner

jermp commented Nov 27, 2019

Yes, probably you should.
I tried myself with gcc4.9 and got this:
g++-4.9: error: unrecognized command line option ‘-std=c++17’
as I expected.
Try to use gcc 7 at least. Thanks and let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants