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

master doesn't build without C++17 standard enforced #420

Open
FallenChromium opened this issue Nov 27, 2021 · 0 comments
Open

master doesn't build without C++17 standard enforced #420

FallenChromium opened this issue Nov 27, 2021 · 0 comments

Comments

@FallenChromium
Copy link

The compiler (clang++ 13 in my case) whines that it cannot find several templates (namely:
ostis-dev-sc-machine/sc-memory/sc-memory/sc_template_generate.hpp:16:23: error: no template named 'optional' in namespace 'std',
ostis-dev-sc-machine/sc-memory/sc-memory/sc_template.hpp:39:15: error: no member named 'make_unique' in namespace 'std') which have been introduced in C++17 and C++14, respectively. I saw a hardcoded stdc++17 flag for multiple compilers, the problem is that on newer macOS-es or exotic compilers, this won't work. In general, it is better to use

set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_STANDARD_REQUIRED ON)

in CMake to resolve this problem (it worked for me btw).

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

1 participant