add macro SPROUT_NON_CONSTEXPR

This commit is contained in:
bolero-MURAKAMI 2013-11-02 18:28:18 +09:00
parent 6b1ef202d8
commit 1132d08f23
37 changed files with 209 additions and 204 deletions

View file

@ -20,7 +20,7 @@ namespace sprout {
// operator<<
//
template<typename Elem, typename Traits, typename IntType>
inline std::basic_istream<Elem, Traits>&
inline SPROUT_NON_CONSTEXPR std::basic_istream<Elem, Traits>&
operator>>(std::basic_istream<Elem, Traits>& lhs, sprout::rational<IntType>& rhs) {
IntType n = IntType(0);
IntType d = IntType(1);
@ -39,7 +39,7 @@ namespace sprout {
return lhs;
}
template<typename Elem, typename Traits, typename IntType>
inline std::basic_ostream<Elem, Traits>&
inline SPROUT_NON_CONSTEXPR std::basic_ostream<Elem, Traits>&
operator<<(std::basic_ostream<Elem, Traits>& lhs, sprout::rational<IntType> const& rhs) {
return lhs << rhs.numerator() << Elem('/') << rhs.denominator();
}