Name renamed to symbol in a derived_unit

This commit is contained in:
Mateusz Pusz
2019-10-15 11:47:36 +02:00
parent 98b78c9a2c
commit 7e31dfe37e
3 changed files with 38 additions and 38 deletions
+26 -26
View File
@@ -119,50 +119,50 @@ namespace units {
// TODO gcc:92101
// Gated by the following gcc bug
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92101
// template<typename Child, fixed_string Name, typename...>
// template<typename Child, fixed_string Symbol, typename...>
// struct derived_unit;
// template<typename Child, fixed_string Name, Dimension D>
// struct derived_unit<Child, Name, D> : downcast_helper<Child, unit<D, ratio<1>>> {
// static constexpr auto name = Name;
// template<typename Child, fixed_string Symbol, Dimension D>
// struct derived_unit<Child, Symbol, D> : downcast_helper<Child, unit<D, ratio<1>>> {
// static constexpr auto symbol = Symbol;
// };
// template<typename Child, fixed_string Name, Dimension D, Ratio R>
// struct derived_unit<Child, Name, D, R> : downcast_helper<Child, unit<D, R>> {
// static constexpr auto name = Name;
// template<typename Child, fixed_string Symbol, Dimension D, Ratio R>
// struct derived_unit<Child, Symbol, D, R> : downcast_helper<Child, unit<D, R>> {
// static constexpr auto symbol = Symbol;
// };
// template<typename Child, fixed_string Name, Unit U>
// struct derived_unit<Child, Name, U> : downcast_helper<Child, U> {
// static constexpr auto name = Name;
// template<typename Child, fixed_string Symbol, Unit U>
// struct derived_unit<Child, Symbol, U> : downcast_helper<Child, U> {
// static constexpr auto symbol = Symbol;
// };
// template<typename Child, fixed_string Name, Dimension D, Unit U, Unit... Us>
// struct derived_unit<Child, Name, D, U, Us...> : downcast_helper<Child, detail::make_derived_unit<D, U, Us...>> {
// static constexpr auto name = Name;
// template<typename Child, fixed_string Symbol, Dimension D, Unit U, Unit... Us>
// struct derived_unit<Child, Symbol, D, U, Us...> : downcast_helper<Child, detail::make_derived_unit<D, U, Us...>> {
// static constexpr auto symbol = Symbol;
// };
template<typename Child, typename Name, typename...>
template<typename Child, typename Symbol, typename...>
struct derived_unit;
template<typename Child, typename Name, Dimension D>
struct derived_unit<Child, Name, D> : downcast_helper<Child, unit<D, ratio<1>>> {
static constexpr auto name = Name::c_str();
template<typename Child, typename Symbol, Dimension D>
struct derived_unit<Child, Symbol, D> : downcast_helper<Child, unit<D, ratio<1>>> {
static constexpr auto symbol = Symbol::c_str();
};
template<typename Child, typename Name, Dimension D, Ratio R>
struct derived_unit<Child, Name, D, R> : downcast_helper<Child, unit<D, R>> {
static constexpr auto name = Name::c_str();
template<typename Child, typename Symbol, Dimension D, Ratio R>
struct derived_unit<Child, Symbol, D, R> : downcast_helper<Child, unit<D, R>> {
static constexpr auto symbol = Symbol::c_str();
};
template<typename Child, typename Name, Unit U>
struct derived_unit<Child, Name, U> : downcast_helper<Child, U> {
static constexpr auto name = Name::c_str();
template<typename Child, typename Symbol, Unit U>
struct derived_unit<Child, Symbol, U> : downcast_helper<Child, U> {
static constexpr auto symbol = Symbol::c_str();
};
template<typename Child, typename Name, Dimension D, Unit U, Unit... Us>
struct derived_unit<Child, Name, D, U, Us...> : downcast_helper<Child, detail::make_derived_unit<D, U, Us...>> {
static constexpr auto name = Name::c_str();
template<typename Child, typename Symbol, Dimension D, Unit U, Unit... Us>
struct derived_unit<Child, Symbol, D, U, Us...> : downcast_helper<Child, detail::make_derived_unit<D, U, Us...>> {
static constexpr auto symbol = Symbol::c_str();
};
// SI prefixes