You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GridPACK C++ code is aging. Some C++ constructs that were acceptable when coding began have been deprecated and not supported by some newer compilers. I have trouble building GridPACK with CLang 16 and 18, which strictly follow C++17. Some things that need to change:
use of std::auto_ptr should be replaced with std::unique_ptr
use of std::unary_function and std::binary_function is not needed
In addition, it might be appropriate to migrate code away from Boost for those constructs that are now standard, e.g. shared_ptr.
The text was updated successfully, but these errors were encountered:
@wperkins: The python wrapper is using std::optional which is available only in C++17 and above. The installation of python wrapper is by default using C++14 (though I am loading gcc/11.2.0 which support C++17) which throws error for std::optional related attributes and modules. To fix this, I had to specifically mention -DCMAKE_CXX_STANDARD=17 in the setup file.
@wperkins: The python wrapper is using std::optional which is available only in C++17 and above. The installation of python wrapper is by default using C++14 (though I am loading gcc/11.2.0 which support C++17) which throws error for std::optional related attributes and modules. To fix this, I had to specifically mention -DCMAKE_CXX_STANDARD=17 in the setup file.
@jainmilan, @bjpalmer: I cannot reproduce this on my personal system or deception. I do not see CMake inserting any C++ standard flags into the build. The Python interface builds fine for me without specifying the above flag.
Can you please provide the details of how you are building GridPACK and the Python interface: system, modules, cmake command, etc.? Also, show where the compiler standard options are showing up in CMakeCache.txt. Thanks.
GridPACK C++ code is aging. Some C++ constructs that were acceptable when coding began have been deprecated and not supported by some newer compilers. I have trouble building GridPACK with CLang 16 and 18, which strictly follow C++17. Some things that need to change:
std::auto_ptr
should be replaced withstd::unique_ptr
std::unary_function
andstd::binary_function
is not neededIn addition, it might be appropriate to migrate code away from Boost for those constructs that are now standard, e.g.
shared_ptr
.The text was updated successfully, but these errors were encountered: