diff options
Diffstat (limited to 'libcxx/include/__numeric/gcd_lcm.h')
| -rw-r--r-- | libcxx/include/__numeric/gcd_lcm.h | 14 | 
1 files changed, 9 insertions, 5 deletions
| diff --git a/libcxx/include/__numeric/gcd_lcm.h b/libcxx/include/__numeric/gcd_lcm.h index 9a53a001f211..5a3f81b695e2 100644 --- a/libcxx/include/__numeric/gcd_lcm.h +++ b/libcxx/include/__numeric/gcd_lcm.h @@ -12,8 +12,12 @@  #include <__assert>  #include <__config> +#include <__type_traits/common_type.h> +#include <__type_traits/is_integral.h> +#include <__type_traits/is_same.h> +#include <__type_traits/is_signed.h> +#include <__type_traits/make_unsigned.h>  #include <limits> -#include <type_traits>  #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)  #  pragma GCC system_header @@ -60,8 +64,8 @@ common_type_t<_Tp,_Up>  gcd(_Tp __m, _Up __n)  {      static_assert((is_integral<_Tp>::value && is_integral<_Up>::value), "Arguments to gcd must be integer types"); -    static_assert((!is_same<typename remove_cv<_Tp>::type, bool>::value), "First argument to gcd cannot be bool" ); -    static_assert((!is_same<typename remove_cv<_Up>::type, bool>::value), "Second argument to gcd cannot be bool" ); +    static_assert((!is_same<__remove_cv_t<_Tp>, bool>::value), "First argument to gcd cannot be bool" ); +    static_assert((!is_same<__remove_cv_t<_Up>, bool>::value), "Second argument to gcd cannot be bool" );      using _Rp = common_type_t<_Tp,_Up>;      using _Wp = make_unsigned_t<_Rp>;      return static_cast<_Rp>(_VSTD::__gcd( @@ -75,8 +79,8 @@ common_type_t<_Tp,_Up>  lcm(_Tp __m, _Up __n)  {      static_assert((is_integral<_Tp>::value && is_integral<_Up>::value), "Arguments to lcm must be integer types"); -    static_assert((!is_same<typename remove_cv<_Tp>::type, bool>::value), "First argument to lcm cannot be bool" ); -    static_assert((!is_same<typename remove_cv<_Up>::type, bool>::value), "Second argument to lcm cannot be bool" ); +    static_assert((!is_same<__remove_cv_t<_Tp>, bool>::value), "First argument to lcm cannot be bool" ); +    static_assert((!is_same<__remove_cv_t<_Up>, bool>::value), "Second argument to lcm cannot be bool" );      if (__m == 0 || __n == 0)          return 0; | 
