diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2019-07-02 00:20:06 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2019-07-02 00:20:06 +0000 |
commit | 5e9ba251804fc4905e22fdcac47c4faa98a20c71 (patch) | |
tree | 39300b5b6f3d139db901c55c32d8cdb70b8c9d25 | |
parent | e380104a4398587d8863855b05b4640fef025699 (diff) |
Mark the newly added '__libcpp_is_constant_evaluated' as 'inline', since it can be included multiple times by multiple headers, and we don't want 'duplicate definition' errors.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@364879 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/type_traits | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/type_traits b/include/type_traits index c7e474925..f954a819c 100644 --- a/include/type_traits +++ b/include/type_traits @@ -4007,9 +4007,11 @@ inline constexpr bool is_constant_evaluated() noexcept { } #endif -_LIBCPP_CONSTEXPR bool __libcpp_is_constant_evaluated() _NOEXCEPT { return __builtin_is_constant_evaluated(); } +inline _LIBCPP_CONSTEXPR +bool __libcpp_is_constant_evaluated() _NOEXCEPT { return __builtin_is_constant_evaluated(); } #else -_LIBCPP_CONSTEXPR bool __libcpp_is_constant_evaluated() _NOEXCEPT { return false; } +inline _LIBCPP_CONSTEXPR +bool __libcpp_is_constant_evaluated() _NOEXCEPT { return false; } #endif template <class _CharT> |