From: Jonathan Wakely Date: Tue, 16 May 2017 13:16:34 +0000 (+0100) Subject: Fix forward declaration of std::type_info for versioned-namespace X-Git-Tag: basepoints/gcc-9~7264 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=423624979a496c1e2755f538b1cf54736a0f449e;p=thirdparty%2Fgcc.git 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 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 039560109c55..8926b933fc86 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 69185794a855..b4a5edfdf43b 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