Skip to content

Commit 530fe87

Browse files
committed
Add <mdspan> and <stdfloat> support
Updates #710
1 parent 0aef4d0 commit 530fe87

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

include/cpp2util.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
// isn't yet supported by all of { VS 2022, g++-10, clang++-12 }
6161
// ... this should approximate "import std;" on those compilers
6262
#else
63+
#ifdef _MSC_VER
64+
#include "intrin.h"
65+
#endif
6366
#include <version>
6467
#include <algorithm>
6568
#include <any>
@@ -150,7 +153,9 @@
150153
#include <list>
151154
#include <locale>
152155
#include <map>
153-
// md_span - not yet listed in SD-6 for feature test flags
156+
#ifdef __cpp_lib_mdspan
157+
#include <mdspan>
158+
#endif
154159
#include <memory>
155160
#ifdef __cpp_lib_memory_resource
156161
#include <memory_resource>
@@ -191,7 +196,9 @@
191196
#include <stdatomic.h>
192197
#endif
193198
#include <stdexcept>
194-
// stdfloat - not yet listed in SD-6 for feature test flags
199+
#if __has_include(<stdfloat>)
200+
#include <stdfloat>
201+
#endif
195202
#ifdef __cpp_lib_jthread
196203
#include <stop_token>
197204
#endif
@@ -220,6 +227,9 @@
220227
// Otherwise, we're not in -pure-cpp2 and so just #include
221228
// what we need in this header to make this self-contained
222229
#else
230+
#ifdef _MSC_VER
231+
#include "intrin.h"
232+
#endif
223233
#include <algorithm>
224234
#include <any>
225235
#include <compare>

0 commit comments

Comments
 (0)