mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-31 19:04:27 +02:00
fix: std::formattable
usage is now conditional
This commit is contained in:
@@ -265,7 +265,11 @@ public:
|
||||
// subentity-id ::= 'N' | 'U' | 'D'
|
||||
// format-spec ::= <as specified by the formatter for the argument type>
|
||||
//
|
||||
#if __cpp_lib_format_ranges
|
||||
template<auto Reference, typename Char, std::formattable<Char> Rep>
|
||||
#else
|
||||
template<auto Reference, typename Rep, typename Char>
|
||||
#endif
|
||||
class MP_UNITS_STD_FMT::formatter<mp_units::quantity<Reference, Rep>, Char> {
|
||||
static constexpr auto unit = get_unit(Reference);
|
||||
static constexpr auto dimension = get_quantity_spec(Reference).dimension;
|
||||
|
Reference in New Issue
Block a user