Skip to content

Commit

Permalink
Merge pull request #313 from ckormanyos/correct_preprocessor
Browse files Browse the repository at this point in the history
Correct preprocessor exclusion of rd_string
  • Loading branch information
ckormanyos authored Nov 30, 2024
2 parents 48f666e + f362fe4 commit 3cf84c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions math/wide_decimal/decwide_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,10 @@
#if !defined(WIDE_DECIMAL_DISABLE_IOSTREAM)
template<typename char_type, typename traits_type,
const std::int32_t ParamDigitsBaseTen, typename LimbType, typename AllocatorType, typename InternalFloatType, typename ExponentType, typename FftFloatType> auto operator<<(std::basic_ostream<char_type, traits_type>& os, const decwide_t<ParamDigitsBaseTen, LimbType, AllocatorType, InternalFloatType, ExponentType, FftFloatType>& f) -> std::basic_ostream<char_type, traits_type>&;
#if !defined(WIDE_DECIMAL_DISABLE_CONSTRUCT_FROM_STRING)
template<typename char_type, typename traits_type,
const std::int32_t ParamDigitsBaseTen, typename LimbType, typename AllocatorType, typename InternalFloatType, typename ExponentType, typename FftFloatType> auto operator>>(std::basic_istream<char_type, traits_type>& is, decwide_t<ParamDigitsBaseTen, LimbType, AllocatorType, InternalFloatType, ExponentType, FftFloatType>& f) -> std::basic_istream<char_type, traits_type>&;
#endif // !WIDE_DECIMAL_DISABLE_CONSTRUCT_FROM_STRING
#endif // !WIDE_DECIMAL_DISABLE_IOSTREAM

// Global unary operators of decwide_t reference.
Expand Down Expand Up @@ -4188,6 +4190,7 @@
return (os << str);
}

#if !defined(WIDE_DECIMAL_DISABLE_CONSTRUCT_FROM_STRING)
template<typename char_type, typename traits_type>
friend auto operator>>(std::basic_istream<char_type, traits_type>& is, decwide_t& f) -> std::basic_istream<char_type, traits_type>&
{
Expand All @@ -4199,6 +4202,8 @@

return is;
}
#endif // !WIDE_DECIMAL_DISABLE_CONSTRUCT_FROM_STRING

#endif // !WIDE_DECIMAL_DISABLE_IOSTREAM

friend inline auto fabs(const decwide_t& x) -> decwide_t
Expand Down

0 comments on commit 3cf84c2

Please sign in to comment.