mirror of
https://github.com/holub/mame
synced 2025-04-22 08:22:15 +03:00
netlist/plib: Fixed detection of clang versions with noexcept issue, added feature constants for C++ standard library version.
This commit is contained in:
parent
753756988d
commit
c60cc01dbc
@ -163,7 +163,7 @@ namespace plib
|
||||
pmatrix2d_vrl(const pmatrix2d_vrl &) = default;
|
||||
pmatrix2d_vrl &operator=(const pmatrix2d_vrl &) = default;
|
||||
pmatrix2d_vrl(pmatrix2d_vrl &&) noexcept = default;
|
||||
pmatrix2d_vrl &operator=(pmatrix2d_vrl &&) noexcept(!compile_info::clang_apple_noexcept_issue::value) = default;
|
||||
pmatrix2d_vrl &operator=(pmatrix2d_vrl &&) noexcept(!compile_info::clang_noexcept_issue::value) = default;
|
||||
|
||||
~pmatrix2d_vrl() = default;
|
||||
|
||||
|
@ -85,6 +85,13 @@ namespace plib
|
||||
NVCC
|
||||
};
|
||||
|
||||
enum class ci_cpp_stdlib
|
||||
{
|
||||
UNKNOWN,
|
||||
LIBSTDCXX,
|
||||
LIBCPP
|
||||
};
|
||||
|
||||
enum class ci_os
|
||||
{
|
||||
UNKNOWN,
|
||||
@ -153,6 +160,16 @@ namespace plib
|
||||
using type = std::integral_constant<ci_compiler, ci_compiler::UNKNOWN>;
|
||||
using version = std::integral_constant<int, 0>;
|
||||
#endif
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
using cpp_stdlib = std::integral_constant<ci_cpp_stdlib, ci_cpp_stdlib::LIBCPP>;
|
||||
using cpp_stdlib_version = std::integral_constant<int, ((_LIBCPP_VERSION) / 1000) * 100 + ((_LIBCPP_VERSION) / 100) % 10>;
|
||||
#elif defined(__GLIBCXX__)
|
||||
using cpp_stdlib = std::integral_constant<ci_cpp_stdlib, ci_cpp_stdlib::LIBSTDCXX>;
|
||||
using cpp_stdlib_version = std::integral_constant<int, (_GLIBCXX_RELEASE) * 100>;
|
||||
#else
|
||||
using cpp_stdlib = std::integral_constant<ci_cpp_stdlib, ci_cpp_stdlib::UNKNOWN>;
|
||||
using cpp_stdlib_version = std::integral_constant<int, 0>;
|
||||
#endif
|
||||
#ifdef __unix__
|
||||
using is_unix = std::integral_constant<bool, true>;
|
||||
#else
|
||||
@ -195,9 +212,9 @@ namespace plib
|
||||
using mingw = std::integral_constant<bool, false>;
|
||||
#endif
|
||||
#if defined(__APPLE__)
|
||||
using clang_apple_noexcept_issue = std::integral_constant<bool, version::value < 1100>;
|
||||
using clang_noexcept_issue = std::integral_constant<bool, version::value < 1100>;
|
||||
#else
|
||||
using clang_apple_noexcept_issue = std::integral_constant<bool, false>;
|
||||
using clang_noexcept_issue = std::integral_constant<bool, (type::value == ci_compiler::CLANG) && (version::value < 800)>;
|
||||
#endif
|
||||
#if defined(__ia64__)
|
||||
using abi_vtable_function_descriptors = std::integral_constant<bool, true>;
|
||||
|
Loading…
Reference in New Issue
Block a user