@@ -47,32 +47,47 @@ namespace FIXED_POINTS_DETAILS
4747 constexpr UFixedBase (const RawType & value) : value(static_cast <InternalType>(value)) {}
4848
4949 public:
50- constexpr UFixedBase (const IntegerLiteral & value)
51- : value(static_cast <InternalType>(static_cast < LargerType<IntegerLiteral, InternalType> >(value) << Fraction)) {}
52-
53- constexpr UFixedBase (const IntegerLiteralU & value)
54- : value(static_cast <InternalType>(static_cast < LargerType<IntegerLiteralU, InternalType> >(value) << Fraction)) {}
55-
56- constexpr UFixedBase (const IntegerLiteralL & value)
57- : value(static_cast <InternalType>(static_cast < LargerType<IntegerLiteralL, InternalType> >(value) << Fraction)) {}
58-
59- constexpr UFixedBase (const IntegerLiteralUL & value)
60- : value(static_cast <InternalType>(static_cast < LargerType<IntegerLiteralUL, InternalType>>(value) << Fraction)) {}
61-
62- constexpr UFixedBase (const IntegerLiteralLL & value)
63- : value(static_cast <InternalType>(static_cast < LargerType<IntegerLiteralLL, InternalType>>(value) << Fraction)) {}
64-
65- constexpr UFixedBase (const IntegerLiteralULL & value)
66- : value(static_cast <InternalType>(static_cast < LargerType<IntegerLiteralULL, InternalType> >(value) << Fraction)) {}
67-
68- constexpr UFixedBase (const DecimalLiteral & value)
69- : value(static_cast <InternalType>(value * Scale)) {}
70-
71- constexpr UFixedBase (const DecimalLiteralF & value)
72- : value(static_cast <InternalType>(value * Scale)) {}
73-
74- constexpr UFixedBase (const DecimalLiteralL & value)
75- : value(static_cast <InternalType>(value * Scale)) {}
50+ constexpr UFixedBase (const char & value)
51+ : value(static_cast <InternalType>(static_cast < LargerType<char , InternalType> >(value) << Fraction)) {}
52+
53+ constexpr UFixedBase (const unsigned char & value)
54+ : value(static_cast <InternalType>(static_cast < LargerType<unsigned char , InternalType> >(value) << Fraction)) {}
55+
56+ constexpr UFixedBase (const signed char & value)
57+ : value(static_cast <InternalType>(static_cast < LargerType<signed char , InternalType> >(value) << Fraction)) {}
58+
59+ constexpr UFixedBase (const unsigned short int & value)
60+ : value(static_cast <InternalType>(static_cast < LargerType<unsigned short int , InternalType> >(value) << Fraction)) {}
61+
62+ constexpr UFixedBase (const signed short int & value)
63+ : value(static_cast <InternalType>(static_cast < LargerType<signed short int , InternalType> >(value) << Fraction)) {}
64+
65+ constexpr UFixedBase (const unsigned int & value)
66+ : value(static_cast <InternalType>(static_cast < LargerType<unsigned int , InternalType> >(value) << Fraction)) {}
67+
68+ constexpr UFixedBase (const signed int & value)
69+ : value(static_cast <InternalType>(static_cast < LargerType<signed int , InternalType> >(value) << Fraction)) {}
70+
71+ constexpr UFixedBase (const unsigned long int & value)
72+ : value(static_cast <InternalType>(static_cast < LargerType<unsigned long int , InternalType> >(value) << Fraction)) {}
73+
74+ constexpr UFixedBase (const signed long int & value)
75+ : value(static_cast <InternalType>(static_cast < LargerType<signed long int , InternalType> >(value) << Fraction)) {}
76+
77+ constexpr UFixedBase (const unsigned long long int & value)
78+ : value(static_cast <InternalType>(static_cast < LargerType<unsigned long long int , InternalType> >(value) << Fraction)) {}
79+
80+ constexpr UFixedBase (const signed long long int & value)
81+ : value(static_cast <InternalType>(static_cast < LargerType<signed long long int , InternalType> >(value) << Fraction)) {}
82+
83+ constexpr UFixedBase (const double & value)
84+ : value(static_cast <InternalType>(value * static_cast <double >(Scale))) {}
85+
86+ constexpr UFixedBase (const float & value)
87+ : value(static_cast <InternalType>(value * static_cast <float >(Scale))) {}
88+
89+ constexpr UFixedBase (const long double & value)
90+ : value(static_cast <InternalType>(value * static_cast <long double >(Scale))) {}
7691 };
7792}
7893FIXED_POINTS_END_NAMESPACE
0 commit comments