This commit is contained in:
Siarhei Fedartsou 2024-05-24 15:35:43 +02:00
parent 99aa9cd9df
commit 405e7f25fc
2 changed files with 14 additions and 8 deletions

View File

@ -323,10 +323,6 @@ if (MSVC)
add_definitions(-DBOOST_ALL_NO_LIB)
endif()
if (MSVC)
add_compile_options(/Zc:__cplusplus)
endif()
if(ENABLE_CONAN)
message(STATUS "Installing dependencies via Conan")
@ -367,7 +363,7 @@ if(ENABLE_CONAN)
KEEP_RPATHS
NO_OUTPUT_DIRS
OPTIONS boost:filesystem_version=3 # https://stackoverflow.com/questions/73392648/error-with-boost-filesystem-version-in-cmake
onetbb:shared=${TBB_SHARED}
# onetbb:shared=${TBB_SHARED}
boost:without_stacktrace=True # Apple Silicon cross-compilation fails without it
BUILD missing
)

View File

@ -15,9 +15,18 @@
#include <mapbox/recursive_wrapper.hpp>
#include <mapbox/variant_visitor.hpp>
// clang-format off
#ifdef _MSC_VER
# define VARIANT_CPLUSPLUS _MSVC_LANG
#else
# define VARIANT_CPLUSPLUS __cplusplus
#endif
// [[deprecated]] is only available in C++14, use this for the time being
#if __cplusplus <= 201103L
#if VARIANT_CPLUSPLUS <= 201103L
# ifdef __GNUC__
# define MAPBOX_VARIANT_DEPRECATED __attribute__((deprecated))
# elif defined(_MSC_VER)
@ -44,6 +53,7 @@
# define VARIANT_INLINE __attribute__((noinline))
# endif
#endif
// clang-format on
// Exceptions
@ -163,7 +173,7 @@ struct enable_if_type
template <typename F, typename V, typename Enable = void>
struct result_of_unary_visit
{
#if __cplusplus >= 201703L
#if VARIANT_CPLUSPLUS >= 201703L
using type = std::invoke_result_t<F, V&>;
#else
using type = std::result_of_t<F(V&)>;
@ -179,7 +189,7 @@ struct result_of_unary_visit<F, V, typename enable_if_type<typename F::result_ty
template <typename F, typename V, typename Enable = void>
struct result_of_binary_visit
{
#if __cplusplus >= 201703L
#if VARIANT_CPLUSPLUS >= 201703L
using type = std::invoke_result_t<F, V&, V&>;
#else
using type = std::result_of_t<F(V&, V&)>;