From f45b25b18dcf12d6f7245a8d8f65b7c1ec069c04 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 27 Aug 2018 21:41:50 +0000 Subject: [PATCH] Fix ODR violation: namespace-scope helpers should not be declared 'static'. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340778 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/variant | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/variant b/include/variant index f9098f422..6c7dca215 100644 --- a/include/variant +++ b/include/variant @@ -1320,7 +1320,7 @@ constexpr bool holds_alternative(const variant<_Types...>& __v) noexcept { template 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();