Skip to content

Commit 745379a

Browse files
committed
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.
llvm-svn: 364879
1 parent adeab8d commit 745379a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libcxx/include/type_traits

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4007,9 +4007,11 @@ inline constexpr bool is_constant_evaluated() noexcept {
40074007
}
40084008
#endif
40094009

4010-
_LIBCPP_CONSTEXPR bool __libcpp_is_constant_evaluated() _NOEXCEPT { return __builtin_is_constant_evaluated(); }
4010+
inline _LIBCPP_CONSTEXPR
4011+
bool __libcpp_is_constant_evaluated() _NOEXCEPT { return __builtin_is_constant_evaluated(); }
40114012
#else
4012-
_LIBCPP_CONSTEXPR bool __libcpp_is_constant_evaluated() _NOEXCEPT { return false; }
4013+
inline _LIBCPP_CONSTEXPR
4014+
bool __libcpp_is_constant_evaluated() _NOEXCEPT { return false; }
40134015
#endif
40144016

40154017
template <class _CharT>

0 commit comments

Comments
 (0)