admb-project / admb

AD Model Builder
http://admb-project.org
Other
64 stars 19 forks source link

Compiling with C++20 #223

Closed archaic closed 2 years ago

archaic commented 2 years ago

Building with GCC, CMake and set(CMAKE_CXX_STANDARD 14|17) works fine, but when I change it to CMAKE_CXX_STANDARD 20, I get the error below:

~/tool/admb-12.3/build/admb/include/tiny_ad.hpp:303:31: error: expected unqualified-id before ‘)’ token 303 | variable<1, nvar, Double>() { / Do not zero-initialize / }

johnoel commented 2 years ago

5d75b90 is fixes for the MacOS.

johnoel commented 2 years ago

@archaic, see changes in 9daea39 to fix the compiler (and runtime) errors in tiny_ad.hpp.

johnoel commented 2 years ago

Merged Pull #224.