scsc Posted May 20, 2021 Report Share Posted May 20, 2021 Tried to run an example using C++14/17 styles. But got these errors similar to this: error: ‘created’ declared as an ‘inline’ field inline static size_t created{ 0u }; Doesn't 14 or 17 support this "inline" feature? Both "-std=c++14" and "-std=c++17" generated the same errors. Quote Link to comment Share on other sites More sharing options...
Eyck Posted May 21, 2021 Report Share Posted May 21, 2021 C++17 supports the inline static syntax (see https://en.cppreference.com/w/cpp/language/static). So you need to have a C++17 capable compiler and specify the language level accordingly. In C++14 this is not supported.... Quote Link to comment Share on other sites More sharing options...
scsc Posted May 21, 2021 Author Report Share Posted May 21, 2021 I think I had also already specified C++17 already: g++ -c -g -Wall -std=c++17 -DSC_INCLUDE_FX -DSC_INCLUDE_DYNAMIC_PROCESSES -I. -I/opt/systemc/include But still got that "inline" error. I am using g++ version g++ --version g++ (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609 looking at the g++ manual, there is no c++17 but c++1z. But even with "-std=c++1z", the errors still persist. What version of g++ are you using to support this feature? Quote Link to comment Share on other sites More sharing options...
scsc Posted May 22, 2021 Author Report Share Posted May 22, 2021 The answer is here: https://stackoverflow.com/questions/48312460/c17-filesystem-is-not-a-namespace-name/48312534#48312534 This particular g++ version doesn't support full c++17 features. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.