From 423624979a496c1e2755f538b1cf54736a0f449e Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 16 May 2017 14:16:34 +0100 Subject: [PATCH] Fix forward declaration of std::type_info for versioned-namespace PR libstdc++/80285 * include/bits/shared_ptr_base.h [!__cpp_rtti] (type_info): Declare outside versioned namespace. From-SVN: r248109 --- libstdc++-v3/ChangeLog | 4 ++++ libstdc++-v3/include/bits/shared_ptr_base.h | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 039560109c5..8926b933fc8 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2017-05-16 Jonathan Wakely + PR libstdc++/80285 + * include/bits/shared_ptr_base.h [!__cpp_rtti] (type_info): Declare + outside versioned namespace. + * configure: Regenerate. 2017-05-16 Marc Glisse diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h index 69185794a85..b4a5edfdf43 100644 --- a/libstdc++-v3/include/bits/shared_ptr_base.h +++ b/libstdc++-v3/include/bits/shared_ptr_base.h @@ -59,6 +59,10 @@ namespace std _GLIBCXX_VISIBILITY(default) { +#if !__cpp_rtti + class type_info; +#endif + _GLIBCXX_BEGIN_NAMESPACE_VERSION #if _GLIBCXX_USE_DEPRECATED @@ -68,10 +72,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #pragma GCC diagnostic pop #endif -#if !__cpp_rtti - class type_info; -#endif - /** * @brief Exception possibly thrown by @c shared_ptr. * @ingroup exceptions -- 2.30.2