OSMExpress icon indicating copy to clipboard operation
OSMExpress copied to clipboard

Build with C++23

Open brawer opened this issue 5 months ago • 3 comments

The current version of the S2 geometry library does not support building with C++14 anymore.

brawer avatar Jul 23 '25 10:07 brawer

Is it not advisable to explicitly declare C++23 as the version in CMake?

bdon avatar Jul 23 '25 12:07 bdon

How to do this?

brawer avatar Jul 23 '25 15:07 brawer

Oh, I suppose set(CMAKE_CXX_STANDARD 23) applies globally so we don't need the target-level declarations?

Anyways, the PR as-is fails to build with a few errors for me right now (macOS 15.5, clang 17.0.0) related to s2:

.../OSMExpress/vendor/s2geometry/src/s2/third_party/absl/meta/type_traits.h:413:35: error: no type named 'result_of' in namespace 'std'
  413 | using result_of_t = typename std::result_of<T>::type;
      |                     ~~~~~~~~~~~~~~^~~~~~~~~
.../OSMExpress/vendor/s2geometry/src/s2/third_party/absl/meta/type_traits.h:413:44: error: expected ';' after alias declaration
  413 | using result_of_t = typename std::result_of<T>::type;
      |                                            ^
      |

bdon avatar Aug 04 '25 07:08 bdon