@@ -688,7 +688,7 @@ class uint128_t {
688
688
return *this ;
689
689
}
690
690
691
- uint128_t operator &(const uint128_t &p) {
691
+ inline uint128_t operator &(const uint128_t &p) {
692
692
return uint128_t (this ->f & p.f , this ->s & p.s );
693
693
}
694
694
@@ -714,11 +714,11 @@ class uint128_t {
714
714
715
715
template <typename T, typename = typename std::enable_if<
716
716
std::is_integral<T>::value, T>::type>
717
- uint128_t operator |(const T p) {
717
+ inline uint128_t operator |(const T p) {
718
718
return uint128_t (p | s);
719
719
}
720
720
721
- uint128_t operator |(const uint128_t &p) {
721
+ inline uint128_t operator |(const uint128_t &p) {
722
722
return uint128_t (this ->f | p.f , this ->s | p.s );
723
723
}
724
724
@@ -730,18 +730,18 @@ class uint128_t {
730
730
731
731
template <typename T, typename = typename std::enable_if<
732
732
std::is_integral<T>::value, T>::type>
733
- uint128_t &operator |=(const T p) {
733
+ inline uint128_t &operator |=(const T p) {
734
734
s |= p.s ;
735
735
return *this ;
736
736
}
737
737
738
738
template <typename T, typename = typename std::enable_if<
739
739
std::is_integral<T>::value, T>::type>
740
- uint128_t operator ^(const T p) {
740
+ inline uint128_t operator ^(const T p) {
741
741
return uint128_t (this ->f , this ->s ^ p);
742
742
}
743
743
744
- uint128_t operator ^(const uint128_t &p) {
744
+ inline uint128_t operator ^(const uint128_t &p) {
745
745
return uint128_t (this ->f ^ p.f , this ->s ^ p.s );
746
746
}
747
747
@@ -753,7 +753,7 @@ class uint128_t {
753
753
754
754
template <typename T, typename = typename std::enable_if<
755
755
std::is_integral<T>::value, T>::type>
756
- uint128_t &operator ^=(const T &p) {
756
+ inline uint128_t &operator ^=(const T &p) {
757
757
s ^= p;
758
758
return *this ;
759
759
}
@@ -787,100 +787,100 @@ class uint128_t {
787
787
// Arithmetic operators
788
788
template <typename T, typename = typename std::enable_if<
789
789
std::is_integral<T>::value, T>::type>
790
- uint128_t operator +(const T &p, const uint128_t &q) {
790
+ inline uint128_t operator +(const T &p, const uint128_t &q) {
791
791
return uint128_t (p) + q;
792
792
}
793
793
794
794
template <typename T, typename = typename std::enable_if<
795
795
std::is_integral<T>::value, T>::type>
796
- uint128_t operator -(const T p, const uint128_t &q) {
796
+ inline uint128_t operator -(const T p, const uint128_t &q) {
797
797
return uint128_t (p) - q;
798
798
}
799
799
800
800
template <typename T, typename = typename std::enable_if<
801
801
std::is_integral<T>::value, T>::type>
802
- uint128_t operator *(const T p, const uint128_t &q) {
803
- return q * p ;
802
+ inline uint128_t operator *(const T p, const uint128_t &q) {
803
+ return uint128_t (p) * q ;
804
804
}
805
805
806
806
template <typename T, typename = typename std::enable_if<
807
807
std::is_integral<T>::value, T>::type>
808
- uint128_t operator /(const T p, const uint128_t &q) {
808
+ inline uint128_t operator /(const T p, const uint128_t &q) {
809
809
return uint128_t (p) / q;
810
810
}
811
811
812
812
template <typename T, typename = typename std::enable_if<
813
813
std::is_integral<T>::value, T>::type>
814
- uint128_t operator %(const T p, const uint128_t &q) {
814
+ inline uint128_t operator %(const T p, const uint128_t &q) {
815
815
return uint128_t (p) % q;
816
816
}
817
817
818
818
// Bitwise operators
819
819
template <typename T, typename = typename std::enable_if<
820
820
std::is_integral<T>::value, T>::type>
821
- uint128_t operator &(const T &p, const uint128_t &q) {
821
+ inline uint128_t operator &(const T &p, const uint128_t &q) {
822
822
return uint128_t (p) & q;
823
823
}
824
824
825
825
template <typename T, typename = typename std::enable_if<
826
826
std::is_integral<T>::value, T>::type>
827
- uint128_t operator |(const T p, const uint128_t &q) {
827
+ inline uint128_t operator |(const T p, const uint128_t &q) {
828
828
return uint128_t (p) | q;
829
829
}
830
830
831
831
template <typename T, typename = typename std::enable_if<
832
832
std::is_integral<T>::value, T>::type>
833
- uint128_t operator ^(const T p, const uint128_t &q) {
833
+ inline uint128_t operator ^(const T p, const uint128_t &q) {
834
834
return uint128_t (p) ^ q;
835
835
}
836
836
837
837
// Boolean operators
838
838
template <typename T, typename = typename std::enable_if<
839
839
std::is_integral<T>::value, T>::type>
840
- bool operator &&(const T p, const uint128_t &q) {
840
+ inline bool operator &&(const T p, const uint128_t &q) {
841
841
return uint128_t (p) && q;
842
842
}
843
843
844
844
template <typename T, typename = typename std::enable_if<
845
845
std::is_integral<T>::value, T>::type>
846
- bool operator ||(const T p, const uint128_t &q) {
846
+ inline bool operator ||(const T p, const uint128_t &q) {
847
847
return uint128_t (p) || q;
848
848
}
849
849
850
850
// Comparison operators
851
851
template <typename T, typename = typename std::enable_if<
852
852
std::is_integral<T>::value, T>::type>
853
- bool operator ==(const T p, const uint128_t &q) {
853
+ inline bool operator ==(const T p, const uint128_t &q) {
854
854
return uint128_t (p) == q;
855
855
}
856
856
857
857
template <typename T, typename = typename std::enable_if<
858
858
std::is_integral<T>::value, T>::type>
859
- bool operator !=(const T p, const uint128_t &q) {
859
+ inline bool operator !=(const T p, const uint128_t &q) {
860
860
return uint128_t (p) != q;
861
861
}
862
862
863
863
template <typename T, typename = typename std::enable_if<
864
864
std::is_integral<T>::value, T>::type>
865
- bool operator <(const T p, const uint128_t &q) {
865
+ inline bool operator <(const T p, const uint128_t &q) {
866
866
return uint128_t (p) < q;
867
867
}
868
868
869
869
template <typename T, typename = typename std::enable_if<
870
870
std::is_integral<T>::value, T>::type>
871
- bool operator <=(const T p, const uint128_t &q) {
871
+ inline bool operator <=(const T p, const uint128_t &q) {
872
872
return uint128_t (p) <= q;
873
873
}
874
874
875
875
template <typename T, typename = typename std::enable_if<
876
876
std::is_integral<T>::value, T>::type>
877
- bool operator >(const T p, const uint128_t &q) {
877
+ inline bool operator >(const T p, const uint128_t &q) {
878
878
return uint128_t (p) > q;
879
879
}
880
880
881
881
template <typename T, typename = typename std::enable_if<
882
882
std::is_integral<T>::value, T>::type>
883
- bool operator >=(const T p, const uint128_t &q) {
883
+ inline bool operator >=(const T p, const uint128_t &q) {
884
884
return uint128_t (p) >= q;
885
885
}
886
886
0 commit comments