| 875 | // Invariant check |
| 876 | template <typename IntType> |
| 877 | BOOST_CXX14_CONSTEXPR |
| 878 | inline bool rational<IntType>::test_invariant() const |
| 879 | { |
| 880 | return ( this->den > int_type(0) ) && ( integer::gcd(this->num, this->den) == |
| 881 | int_type(1) ); |
| 882 | } |
| 883 | |
| 884 | // Normalisation |
| 885 | template <typename IntType> |