Skip to content

Commit

Permalink
Tentative clang fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluescarni committed Nov 30, 2021
1 parent e5e0f50 commit 2ca7775
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 0 deletions.
13 changes: 13 additions & 0 deletions include/mp++/complex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3147,6 +3147,13 @@ inline bool operator!=(const T &x, const U &y)
inline namespace literals
{

#if defined(__clang__)

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-identifier"

#endif

#define MPPP_DECLARE_COMPLEX_UDL(prec) \
template <char... Chars> \
inline complex operator"" _icr##prec() \
Expand All @@ -3161,6 +3168,12 @@ MPPP_DECLARE_COMPLEX_UDL(1024)

#undef MPPP_DECLARE_COMPLEX_UDL

#if defined(__clang__)

#pragma clang diagnostic pop

#endif

} // namespace literals

// Implementations of the assignments of complex to other mp++ classes.
Expand Down
13 changes: 13 additions & 0 deletions include/mp++/complex128.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1268,12 +1268,25 @@ constexpr bool operator!=(const T &x, const U &y)
inline namespace literals
{

#if defined(__clang__)

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-identifier"

#endif

template <char... Chars>
inline complex128 operator"" _icq()
{
return complex128{0, operator"" _rq<Chars...>()};
}

#if defined(__clang__)

#pragma clang diagnostic pop

#endif

} // namespace literals

// Implementation of integer's assignment
Expand Down
13 changes: 13 additions & 0 deletions include/mp++/detail/integer_literals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,13 @@ inline integer<SSize> integer_literal_impl()
inline namespace literals
{

#if defined(__clang__)

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-identifier"

#endif

#define MPPP_DECLARE_INTEGRAL_UDL(n) \
template <char... Chars> \
inline integer<n> operator"" _z##n() \
Expand All @@ -414,6 +421,12 @@ MPPP_DECLARE_INTEGRAL_UDL(3)

#undef MPPP_DECLARE_INTEGRAL_UDL

#if defined(__clang__)

#pragma clang diagnostic pop

#endif

} // namespace literals

} // namespace mppp
Expand Down
13 changes: 13 additions & 0 deletions include/mp++/detail/rational_literals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ namespace mppp
inline namespace literals
{

#if defined(__clang__)

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-identifier"

#endif

#define MPPP_DECLARE_RATIONAL_UDL(n) \
template <char... Chars> \
inline rational<n> operator"" _q##n() \
Expand All @@ -30,6 +37,12 @@ MPPP_DECLARE_RATIONAL_UDL(3)

#undef MPPP_DECLARE_RATIONAL_UDL

#if defined(__clang__)

#pragma clang diagnostic pop

#endif

} // namespace literals

} // namespace mppp
Expand Down
13 changes: 13 additions & 0 deletions include/mp++/detail/real128_literal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ namespace mppp
inline namespace literals
{

#if defined(__clang__)

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-identifier"

#endif

template <char... Chars>
inline real128 operator"" _rq()
{
Expand All @@ -33,6 +40,12 @@ inline real128 operator"" _rq()
return real128(arr);
}

#if defined(__clang__)

#pragma clang diagnostic pop

#endif

} // namespace literals

} // namespace mppp
Expand Down
13 changes: 13 additions & 0 deletions include/mp++/detail/real_literals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ inline real real_literal_impl(::mpfr_prec_t prec)
inline namespace literals
{

#if defined(__clang__)

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-identifier"

#endif

#define MPPP_DECLARE_REAL_UDL(prec) \
template <char... Chars> \
inline real operator"" _r##prec() \
Expand All @@ -62,6 +69,12 @@ MPPP_DECLARE_REAL_UDL(1024)

#undef MPPP_DECLARE_REAL_UDL

#if defined(__clang__)

#pragma clang diagnostic pop

#endif

} // namespace literals

} // namespace mppp
Expand Down

0 comments on commit 2ca7775

Please sign in to comment.