[libcxx-commits] [libcxx] r364879 - 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.
    Marshall Clow via libcxx-commits 
    libcxx-commits at lists.llvm.org
       
    Mon Jul  1 17:20:07 PDT 2019
    
    
  
Author: marshall
Date: Mon Jul  1 17:20:06 2019
New Revision: 364879
URL: http://llvm.org/viewvc/llvm-project?rev=364879&view=rev
Log:
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.
Modified:
    libcxx/trunk/include/type_traits
Modified: libcxx/trunk/include/type_traits
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/type_traits?rev=364879&r1=364878&r2=364879&view=diff
==============================================================================
--- libcxx/trunk/include/type_traits (original)
+++ libcxx/trunk/include/type_traits Mon Jul  1 17:20:06 2019
@@ -4007,9 +4007,11 @@ inline constexpr bool is_constant_evalua
 }
 #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>
    
    
More information about the libcxx-commits
mailing list