mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
add macro SPROUT_NON_CONSTEXPR
This commit is contained in:
parent
6b1ef202d8
commit
1132d08f23
37 changed files with 209 additions and 204 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue