Skip to content

Commit 8334026

Browse files
committed
Update the C++ version from 17 to 20.
1 parent 6dadda5 commit 8334026

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if(WIN32)
5050
set(SPM_ENABLE_SHARED OFF)
5151
endif()
5252

53-
set(CMAKE_CXX_STANDARD 17)
53+
set(CMAKE_CXX_STANDARD 20)
5454
set(CMAKE_CXX_STANDARD_REQUIRED ON)
5555

5656
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND

third_party/darts_clone/darts.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,12 +1457,12 @@ class DoubleArrayBuilder {
14571457
void clear();
14581458

14591459
private:
1460-
enum { BLOCK_SIZE = 256 };
1461-
enum { NUM_EXTRA_BLOCKS = 16 };
1462-
enum { NUM_EXTRAS = BLOCK_SIZE * NUM_EXTRA_BLOCKS };
1460+
static constexpr int BLOCK_SIZE = 256;
1461+
static constexpr int NUM_EXTRA_BLOCKS = 16;
1462+
static constexpr int NUM_EXTRAS = BLOCK_SIZE * NUM_EXTRA_BLOCKS;
14631463

1464-
enum { UPPER_MASK = 0xFF << 21 };
1465-
enum { LOWER_MASK = 0xFF };
1464+
static constexpr int UPPER_MASK = 0xFF << 21;
1465+
static constexpr int LOWER_MASK = 0xFF;
14661466

14671467
typedef DoubleArrayBuilderUnit unit_type;
14681468
typedef DoubleArrayBuilderExtraUnit extra_type;

0 commit comments

Comments
 (0)