#include <bits/c++config.h>
#include <bits/stl_iterator_base_types.h>
#include <bits/stl_numeric.h>
-#include <ext/numeric_traits.h>
#ifdef _GLIBCXX_PARALLEL
# include <parallel/numeric>
#endif
+#if __cplusplus >= 201402L
+# include <type_traits>
+# include <bit>
+#endif
+
+#if __cplusplus >= 201703L
+# include <bits/stl_function.h>
+#endif
+
+#if __cplusplus > 201703L
+# include <limits>
+#endif
+
/**
* @defgroup numerics Numerics
*
* arrays, generalized numeric algorithms, and mathematical special functions.
*/
-#if __cplusplus >= 201402L
-#include <type_traits>
-#include <bit>
-
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+#if __cplusplus >= 201402L
namespace __detail
{
// std::abs is not constexpr, doesn't support unsigned integers,
}
#endif // C++17
-
-_GLIBCXX_END_NAMESPACE_VERSION
-} // namespace std
-
#endif // C++14
#if __cplusplus > 201703L
-#include <limits>
-namespace std _GLIBCXX_VISIBILITY(default)
-{
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
// midpoint
# define __cpp_lib_interpolate 201902L
static_assert( sizeof(_Tp) != 0, "type must be complete" );
return __a + (__b - __a) / 2;
}
-_GLIBCXX_END_NAMESPACE_VERSION
-} // namespace std
-
#endif // C++20
-#if __cplusplus > 201402L
-#include <bits/stl_function.h>
-
-namespace std _GLIBCXX_VISIBILITY(default)
-{
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
+#if __cplusplus >= 201703L
#if __cplusplus > 201703L
#define __cpp_lib_constexpr_numeric 201911L
}
// @} group numeric_ops
+#endif // C++17
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#if __cplusplus >= 201703L
// Parallel STL algorithms
# if _PSTL_EXECUTION_POLICIES_DEFINED
// If <execution> has already been included, pull in implementations
std::gcd<const int&, const int&>(0.1, 0.1); // { dg-error "from here" }
}
-// { dg-error "must be integers" "" { target *-*-* } 160 }
-// { dg-error "must be integers" "" { target *-*-* } 161 }
-// { dg-error "must not be bool" "" { target *-*-* } 162 }
-// { dg-error "must not be bool" "" { target *-*-* } 163 }
+// { dg-error "must be integers" "" { target *-*-* } 169 }
+// { dg-error "must be integers" "" { target *-*-* } 170 }
+// { dg-error "must not be bool" "" { target *-*-* } 171 }
+// { dg-error "must not be bool" "" { target *-*-* } 172 }
// { dg-prune-output "deleted function" }
// { dg-prune-output "incomplete type .*make_unsigned" }
std::lcm<const int&, const int&>(0.1, 0.1); // { dg-error "from here" }
}
-// { dg-error "must be integers" "" { target *-*-* } 174 }
-// { dg-error "must be integers" "" { target *-*-* } 175 }
-// { dg-error "must not be bool" "" { target *-*-* } 176 }
-// { dg-error "must not be bool" "" { target *-*-* } 177 }
+// { dg-error "must be integers" "" { target *-*-* } 183 }
+// { dg-error "must be integers" "" { target *-*-* } 184 }
+// { dg-error "must not be bool" "" { target *-*-* } 185 }
+// { dg-error "must not be bool" "" { target *-*-* } 186 }
// { dg-prune-output "deleted function" }
// { dg-prune-output "incomplete type .*make_unsigned" }