File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
libcxx/include/__type_traits Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 2020_LIBCPP_BEGIN_NAMESPACE_STD
2121
2222// clang-format off
23- template <class _Tp > struct __libcpp_is_floating_point : false_type {} ;
24- template <> struct __libcpp_is_floating_point <float > : true_type {} ;
25- template <> struct __libcpp_is_floating_point <double > : true_type {} ;
26- template <> struct __libcpp_is_floating_point <long double > : true_type {} ;
23+ template <class _Tp > inline const bool __is_floating_point_impl = false ;
24+ template <> inline const bool __is_floating_point_impl <float > = true ;
25+ template <> inline const bool __is_floating_point_impl <double > = true ;
26+ template <> inline const bool __is_floating_point_impl <long double > = true ;
2727// clang-format on
2828
2929template <class _Tp >
30- struct _LIBCPP_NO_SPECIALIZATIONS is_floating_point : __libcpp_is_floating_point<__remove_cv_t <_Tp> > {};
30+ struct _LIBCPP_NO_SPECIALIZATIONS is_floating_point
31+ : integral_constant<bool , __is_floating_point_impl<__remove_cv_t <_Tp> > > {};
3132
3233#if _LIBCPP_STD_VER >= 17
33- template <class _Tp >
34- _LIBCPP_NO_SPECIALIZATIONS inline constexpr bool is_floating_point_v = is_floating_point< _Tp>::value ;
34+ template <class _Tp >
35+ inline constexpr bool is_floating_point_v = __is_floating_point_impl< __remove_cv_t < _Tp>> ;
3536#endif
3637
3738_LIBCPP_END_NAMESPACE_STD
You can’t perform that action at this time.
0 commit comments