refactor!: replace one_rep with reference<D, U>

This commit is contained in:
Johel Ernesto Guerrero Peña
2021-03-18 22:37:25 +01:00
committed by Mateusz Pusz
parent bf27b256b2
commit 9a520edfe9
65 changed files with 798 additions and 721 deletions
@@ -246,6 +246,22 @@ struct _point_kind_base;
template<typename T>
concept PointKind = kind_impl_<T, detail::_point_kind_base>;
// Reference
namespace detail {
template<typename T>
inline constexpr bool is_reference = false;
} // namespace detail
/**
* @brief A concept matching all references in the library.
*
* Satisfied by all specializations of @c reference.
*/
template<typename T>
concept Reference = detail::is_reference<T>;
// Quantity, QuantityPoint, QuantityKind, QuantityPointKind
namespace detail {
+4
View File
@@ -42,13 +42,17 @@
UNITS_PRAGMA(GCC diagnostic ignored "-Wunknown-pragmas") \
UNITS_PRAGMA(GCC diagnostic ignored "-Wunknown-warning-option") \
UNITS_PRAGMA(GCC diagnostic ignored X)
#define UNITS_DIAGNOSTIC_IGNORE_MISSING_BRACES UNITS_DIAGNOSTIC_IGNORE("-Wmissing-braces")
#define UNITS_DIAGNOSTIC_IGNORE_NON_TEMPLATE_FRIEND UNITS_DIAGNOSTIC_IGNORE("-Wnon-template-friend")
#define UNITS_DIAGNOSTIC_IGNORE_SHADOW UNITS_DIAGNOSTIC_IGNORE("-Wshadow")
#else
#define UNITS_DIAGNOSTIC_PUSH UNITS_PRAGMA(warning(push))
#define UNITS_DIAGNOSTIC_POP UNITS_PRAGMA(warning(pop))
#define UNITS_DIAGNOSTIC_IGNORE_PRAGMAS UNITS_PRAGMA(warning(disable : 4068))
#define UNITS_DIAGNOSTIC_IGNORE(X) UNITS_DIAGNOSTIC_IGNORE_PRAGMAS UNITS_PRAGMA(warning(disable : X))
#define UNITS_DIAGNOSTIC_IGNORE_MISSING_BRACES
#define UNITS_DIAGNOSTIC_IGNORE_NON_TEMPLATE_FRIEND
#define UNITS_DIAGNOSTIC_IGNORE_SHADOW
#endif
#if UNITS_COMP_CLANG