[libcxx-commits] [libcxx] [libc++] Introduce a new attribute keyword for Clang improves compatibility with Mingw-GCC (PR #141040)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 22 14:18:17 PDT 2025


================
@@ -530,6 +530,48 @@ typedef __char32_t char32_t;
 #    define _LIBCPP_HIDE_FROM_ABI_AFTER_V1 _LIBCPP_HIDE_FROM_ABI
 #  endif
 
+// _LIBCPP_HIDE_FROM_ABI is required for member functions defined within an inner class of a class template
+// (e.g., std::basic_ostream<...>::sentry::sentry(...)), due to inconsistent behavior in MinGW-GCC (and
+// Cygwin as well, in all relevant cases) regarding template instantiation and symbol visibility when combined
+// with __declspec(dllexport/dllimport).
----------------
jeremyd2019 wrote:

```suggestion
// with __declspec(dllexport/dllimport) and extern.
```

https://github.com/llvm/llvm-project/pull/141040


More information about the libcxx-commits mailing list