From 46b4f69a281884f0613f10bdcce1d07d32d74e90 Mon Sep 17 00:00:00 2001 From: Thomas Bleher Date: Thu, 29 Jun 2023 14:24:49 +0200 Subject: [PATCH] Support _GLIBCXX_DEBUG libstdc++ has a special debug mode, which is enabled by #define-ing _GLIBCXX_DEBUG. In this mode std::vector is actually std::__debug::vector. Adjust the vector forward declaration to make the code build when _GLIBCXX_DEBUG is defined. --- src/c4/std/vector_fwd.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/c4/std/vector_fwd.hpp b/src/c4/std/vector_fwd.hpp index a739b7d2..55025bd5 100644 --- a/src/c4/std/vector_fwd.hpp +++ b/src/c4/std/vector_fwd.hpp @@ -13,7 +13,13 @@ __pragma(warning(disable : 4643)) #endif namespace std { template class allocator; +#ifdef _GLIBCXX_DEBUG +inline namespace __debug { template class vector; +} +#else +template class vector; +#endif } // namespace std #if defined(_MSC_VER) __pragma(warning(pop))