[libcxx-commits] [libcxx] [libcxx] Implementation of P1831R1 (PR #101439)
Josh Karns via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Aug 4 01:19:41 PDT 2024
jkarns275 wrote:
> > It seems like adding `[[deprecated]]` / `_LIBCPP_DEPRECATED_IN_CXX11` to template specializations does not emit a warning, the attribute is seemingly ignored unless the base template has the attribute (which would not make sense here).
>
> In any case, it's probably `_LIBCPP_DEPRECATED_IN_CXX20` or conditional compilation on `_LIBCPP_STD_VER >= 20` that should be used.
>
> I think we should continue to add the attribute since it works with GCC.
>
> For Clang, I think I've found a partial workaround but it's unknown whether there's a complete one, see [#44496 (comment)](https://github.com/llvm/llvm-project/issues/44496#issuecomment-2264382239). Note there're currently pitfalls.
I went ahead and borrowed from the Microsoft STL here: https://github.com/microsoft/STL/pull/634. This should create warnings for the deprecated parts of the library, but they won't be direct.
I have noticed that that throughout libcxx there are no custom deprecation messages -- is this for compatibility reasons? Custom messages would make things a bit clearer here, but I don't know if it is acceptable here.
https://github.com/llvm/llvm-project/pull/101439
More information about the libcxx-commits
mailing list