Implement most of P0607: Inline Variables for the Standard Library. This involved marking a lot of variables as inline (but only for C++17 and later).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321658 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -26,7 +26,7 @@ duration_cast(const duration<Rep, Period>& fd);
|
||||
|
||||
template <class Rep> struct treat_as_floating_point : is_floating_point<Rep> {};
|
||||
|
||||
template <class Rep> constexpr bool treat_as_floating_point_v
|
||||
template <class Rep> inline constexpr bool treat_as_floating_point_v
|
||||
= treat_as_floating_point<Rep>::value; // C++17
|
||||
|
||||
template <class Rep>
|
||||
@@ -419,7 +419,8 @@ template <class _Rep>
|
||||
struct _LIBCPP_TEMPLATE_VIS treat_as_floating_point : is_floating_point<_Rep> {};
|
||||
|
||||
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
|
||||
template <class _Rep> _LIBCPP_CONSTEXPR bool treat_as_floating_point_v
|
||||
template <class _Rep>
|
||||
_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool treat_as_floating_point_v
|
||||
= treat_as_floating_point<_Rep>::value;
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user