forked from mpusz/mp-units
build: COMP_XXX renamed to UNITS_COMP_XXX
This commit is contained in:
+1
-1
@@ -74,7 +74,7 @@ enum class downcast_mode {
|
||||
|
||||
template<typename Target, Downcastable T, downcast_mode mode = static_cast<downcast_mode>(UNITS_DOWNCAST_MODE)>
|
||||
struct downcast_dispatch : std::conditional_t<mode == downcast_mode::off, T,
|
||||
#ifdef COMP_MSVC
|
||||
#ifdef UNITS_COMP_MSVC
|
||||
downcast_child<Target, T>> {};
|
||||
#else
|
||||
std::conditional_t<mode == downcast_mode::automatic && has_downcast_guide<T>,
|
||||
|
||||
+9
-9
@@ -23,15 +23,15 @@
|
||||
#pragma once
|
||||
|
||||
#if __clang__
|
||||
#define COMP_CLANG __clang_major__
|
||||
#define UNITS_COMP_CLANG __clang_major__
|
||||
#elif __GNUC__
|
||||
#define COMP_GCC __GNUC__
|
||||
#define COMP_GCC_MINOR __GNUC_MINOR__
|
||||
#define UNITS_COMP_GCC __GNUC__
|
||||
#define UNITS_COMP_GCC_MINOR __GNUC_MINOR__
|
||||
#elif _MSC_VER
|
||||
#define COMP_MSVC _MSC_VER
|
||||
#define UNITS_COMP_MSVC _MSC_VER
|
||||
#endif
|
||||
|
||||
#if COMP_CLANG
|
||||
#if UNITS_COMP_CLANG
|
||||
|
||||
#include <ciso646>
|
||||
#if _LIBCPP_VERSION
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
#if COMP_CLANG == 12 && UNITS_LIBCXX
|
||||
#if UNITS_COMP_CLANG == 12 && UNITS_LIBCXX
|
||||
|
||||
#include <concepts/compare.hpp>
|
||||
#include <concepts/concepts.hpp>
|
||||
@@ -55,7 +55,7 @@
|
||||
#include <concepts>
|
||||
#include <compare>
|
||||
|
||||
#if COMP_MSVC || COMP_CLANG
|
||||
#if UNITS_COMP_MSVC || UNITS_COMP_CLANG
|
||||
|
||||
#define TYPENAME typename
|
||||
|
||||
@@ -68,12 +68,12 @@
|
||||
|
||||
namespace std {
|
||||
|
||||
#if COMP_GCC
|
||||
#if UNITS_COMP_GCC
|
||||
|
||||
template<class T>
|
||||
concept default_constructible = constructible_from<T>;
|
||||
|
||||
#elif COMP_CLANG && UNITS_LIBCXX
|
||||
#elif UNITS_COMP_CLANG && UNITS_LIBCXX
|
||||
|
||||
// concepts
|
||||
using concepts::common_with;
|
||||
|
||||
@@ -357,7 +357,7 @@ public:
|
||||
|
||||
[[nodiscard]] friend constexpr auto operator<=>(const quantity& lhs, const quantity& rhs)
|
||||
requires std::three_way_comparable<rep>
|
||||
#if COMP_GCC == 10 && COMP_GCC_MINOR >= 2
|
||||
#if UNITS_COMP_GCC == 10 && UNITS_COMP_GCC_MINOR >= 2
|
||||
= default;
|
||||
#else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user