@@ -26,10 +26,10 @@ template< unsigned Integer, unsigned Fraction >
2626class SFixed
2727{
2828public:
29- constexpr static uintmax_t IntegerSize = Integer + 1 ;
30- constexpr static uintmax_t FractionSize = Fraction;
31- constexpr static uintmax_t LogicalSize = IntegerSize + FractionSize;
32- constexpr static uintmax_t Scale = UINTMAX_C(1 ) << FractionSize;
29+ static constexpr uintmax_t IntegerSize = Integer + 1 ;
30+ static constexpr uintmax_t FractionSize = Fraction;
31+ static constexpr uintmax_t LogicalSize = IntegerSize + FractionSize;
32+ static constexpr uintmax_t Scale = UINTMAX_C(1 ) << FractionSize;
3333
3434public:
3535 static_assert (LogicalSize <= FIXED_POINTS_DETAILS::BitSize<intmax_t >::Value, " Platform does not have a native type large enough for SFixed." );
@@ -39,22 +39,22 @@ class SFixed
3939 using FractionType = FIXED_POINTS_DETAILS::LeastUInt<FractionSize>;
4040 using InternalType = FIXED_POINTS_DETAILS::LeastInt<LogicalSize>;
4141
42- constexpr static uintmax_t InternalSize = FIXED_POINTS_DETAILS::BitSize<InternalType>::Value;
42+ static constexpr uintmax_t InternalSize = FIXED_POINTS_DETAILS::BitSize<InternalType>::Value;
4343
4444 using ShiftType = FIXED_POINTS_DETAILS::LeastUInt<LogicalSize>;
4545 using MaskType = FIXED_POINTS_DETAILS::LeastUInt<LogicalSize>;
4646
4747public:
48- constexpr static ShiftType IntegerShift = FractionSize;
49- constexpr static ShiftType FractionShift = 0 ;
48+ static constexpr ShiftType IntegerShift = FractionSize;
49+ static constexpr ShiftType FractionShift = 0 ;
5050
51- constexpr static MaskType IntegerMask = FIXED_POINTS_DETAILS::IdentityMask<IntegerSize>::Value;
52- constexpr static MaskType FractionMask = FIXED_POINTS_DETAILS::IdentityMask<FractionSize>::Value;
51+ static constexpr MaskType IntegerMask = FIXED_POINTS_DETAILS::IdentityMask<IntegerSize>::Value;
52+ static constexpr MaskType FractionMask = FIXED_POINTS_DETAILS::IdentityMask<FractionSize>::Value;
5353
54- constexpr static MaskType IdentityMask = (IntegerMask << IntegerShift) | (FractionMask << FractionShift);
54+ static constexpr MaskType IdentityMask = (IntegerMask << IntegerShift) | (FractionMask << FractionShift);
5555
56- constexpr static MaskType MidpointMask = FIXED_POINTS_DETAILS::MsbMask<FractionSize>::Value;
57- constexpr static MaskType LesserMidpointMask = MidpointMask - 1 ;
56+ static constexpr MaskType MidpointMask = FIXED_POINTS_DETAILS::MsbMask<FractionSize>::Value;
57+ static constexpr MaskType LesserMidpointMask = MidpointMask - 1 ;
5858
5959protected:
6060 class RawType
@@ -103,7 +103,7 @@ class SFixed
103103 template < unsigned IntegerOut, unsigned FractionOut >
104104 constexpr explicit operator SFixed<IntegerOut, FractionOut>() const ;
105105
106- constexpr static SFixed fromInternal (const InternalType & value);
106+ static constexpr SFixed fromInternal (const InternalType & value);
107107
108108 constexpr SFixed operator -() const ;
109109 SFixed & operator ++();
@@ -114,15 +114,15 @@ class SFixed
114114 SFixed & operator /=(const SFixed & other);
115115
116116public:
117- constexpr static SFixed Epsilon = SFixed::fromInternal(1 );
118- constexpr static SFixed MinValue = SFixed::fromInternal(FIXED_POINTS_DETAILS::MsbMask<InternalSize>::Value);
119- constexpr static SFixed MaxValue = SFixed::fromInternal(~FIXED_POINTS_DETAILS::MsbMask<InternalSize>::Value);
117+ static constexpr SFixed Epsilon = SFixed::fromInternal(1 );
118+ static constexpr SFixed MinValue = SFixed::fromInternal(FIXED_POINTS_DETAILS::MsbMask<InternalSize>::Value);
119+ static constexpr SFixed MaxValue = SFixed::fromInternal(~FIXED_POINTS_DETAILS::MsbMask<InternalSize>::Value);
120120
121121 // 40 digits is probably enough for these
122- constexpr static SFixed Pi = 3.1415926535897932384626433832795028841971 ;
123- constexpr static SFixed E = 2.718281828459045235360287471352662497757 ;
124- constexpr static SFixed Phi = 1.6180339887498948482045868343656381177203 ;
125- constexpr static SFixed Tau = 6.2831853071795864769252867665590057683943 ;
122+ static constexpr SFixed Pi = 3.1415926535897932384626433832795028841971 ;
123+ static constexpr SFixed E = 2.718281828459045235360287471352662497757 ;
124+ static constexpr SFixed Phi = 1.6180339887498948482045868343656381177203 ;
125+ static constexpr SFixed Tau = 6.2831853071795864769252867665590057683943 ;
126126};
127127
128128
0 commit comments