mirror of
https://github.com/martinus/unordered_dense.git
synced 2026-01-18 17:21:27 +01:00
fix stl getting not included on msvc when C++23 is enabled
This commit is contained in:
committed by
Martin Leitner-Ankerl
parent
942bb1d2b6
commit
8ab51b8511
@@ -51,8 +51,9 @@ if(ANKERL_ENABLE_EXAMPLE)
|
||||
|
||||
if(ANKERL_ENABLE_MODULES)
|
||||
target_link_libraries(example PRIVATE unordered_dense::unordered_dense_module)
|
||||
# force no std module as cmake support is experimental
|
||||
set_target_properties(example
|
||||
PROPERTIES COMPILE_DEFINITIONS MODULES)
|
||||
PROPERTIES COMPILE_DEFINITIONS MODULES ANKERL_UNOREDERED_DENSE_STD_MODULE=0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
#else
|
||||
|
||||
# if !defined(ANKERL_UNORDERED_DENSE_STD_MODULE)
|
||||
# if defined(__cpp_modules) && __cpp_modules >= 201907L && defined(__cpp_lib_modules) && __cpp_lib_modules >= 202207L
|
||||
# if defined(ANKERL_UNORDERED_DENSE_IN_MODULE) && defined(__cpp_modules) && __cpp_modules >= 201907L && defined(__cpp_lib_modules) && __cpp_lib_modules >= 202207L
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
||||
# define ANKERL_UNORDERED_DENSE_STD_MODULE 1
|
||||
# else
|
||||
|
||||
@@ -12,18 +12,20 @@ module;
|
||||
|
||||
#if !defined(ANKERL_UNORDERED_DENSE_STD_MODULE)
|
||||
# if defined(__cpp_modules) && __cpp_modules >= 201907L && defined(__cpp_lib_modules) && __cpp_lib_modules >= 202207L
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
||||
# define ANKERL_UNORDERED_DENSE_STD_MODULE 1
|
||||
# else
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
||||
# define ANKERL_UNORDERED_DENSE_STD_MODULE 0
|
||||
# endif
|
||||
#else
|
||||
#error "BBBBBBBBBBBBB"
|
||||
#endif
|
||||
|
||||
#if ANKERL_UNORDERED_DENSE_STD_MODULE
|
||||
import std;
|
||||
#endif
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
||||
#define ANKERL_UNORDERED_DENSE_IN_MODULE
|
||||
#include <ankerl/unordered_dense.h>
|
||||
|
||||
export module ankerl.unordered_dense;
|
||||
|
||||
Reference in New Issue
Block a user