Skip to content

Commit 282f10e

Browse files
committed
check c++ std
1 parent a8e8c83 commit 282f10e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

rpp/base.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11

22
#pragma once
33

4+
#if __cplusplus < 202002L
5+
#error "Unsupported C++ standard: only C++20 or newer is supported."
6+
#endif
7+
48
#ifdef _MSC_VER
59

610
#define RPP_COMPILER_MSVC
@@ -10,7 +14,7 @@
1014

1115
// TODO(max): bump when they fix the coroutine bug
1216
#if _MSC_VER < 1937
13-
#error "Unsupported MSVC version: only 19.37+ is supported."
17+
#error "Unsupported MSVC version: only 19.37 or newer is supported."
1418
#endif
1519

1620
#elif defined __clang__
@@ -21,7 +25,7 @@
2125
#include <new>
2226

2327
#if __clang_major__ < 17
24-
#error "Unsupported Clang version: only 17+ is supported."
28+
#error "Unsupported Clang version: only 17 or newer is supported."
2529
#endif
2630

2731
#else
@@ -50,7 +54,7 @@
5054
#if defined __x86_64__ || defined _M_X64
5155
#define RPP_ARCH_X64
5256
#else
53-
#error "Unsupported architecture: only x64 is supported."
57+
#error "Unsupported architecture: only x86_64 is supported."
5458
#endif
5559

5660
#define null nullptr

0 commit comments

Comments
 (0)