[libcxx] r340778 - Fix ODR violation: namespace-scope helpers should not be declared 'static'.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 27 14:41:51 PDT 2018


Author: rsmith
Date: Mon Aug 27 14:41:50 2018
New Revision: 340778

URL: http://llvm.org/viewvc/llvm-project?rev=340778&view=rev
Log:
Fix ODR violation: namespace-scope helpers should not be declared 'static'.

Modified:
    libcxx/trunk/include/variant

Modified: libcxx/trunk/include/variant
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/variant?rev=340778&r1=340777&r2=340778&view=diff
==============================================================================
--- libcxx/trunk/include/variant (original)
+++ libcxx/trunk/include/variant Mon Aug 27 14:41:50 2018
@@ -1320,7 +1320,7 @@ constexpr bool holds_alternative(const v
 
 template <size_t _Ip, class _Vp>
 inline _LIBCPP_INLINE_VISIBILITY
-static constexpr auto&& __generic_get(_Vp&& __v) {
+constexpr auto&& __generic_get(_Vp&& __v) {
   using __variant_detail::__access::__variant;
   if (!__holds_alternative<_Ip>(__v)) {
     __throw_bad_variant_access();




More information about the cfe-commits mailing list