Skip to content

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

@FallenChromium

Description

@FallenChromium

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions