SWI-Prolog / packages-cpp

The SWI-Prolog C++ interface
30 stars 14 forks source link

Retain C++17 compatibility by removing designated initializer (a C++20 feature) #58

Closed kamahen closed 1 year ago

kamahen commented 1 year ago

Discussion: https://swi-prolog.discourse.group/t/ann-swi-prolog-9-1-17/6890/2

JanWielemaker commented 1 year ago

Thanks. Modified a little to use the designated initializers for C++20 and to do the checks for C++-17 compatibility only when compiling the Debug version. This should notify us if we accidentally introduce C++-20 features. Note that when setting CMAKE_CXX_STANDARD to 20 in CMakeLists.txt it fails to compile. Apparently the current code is not C++-20 compatible :cry: .