[libcxx-commits] [PATCH] D131727: Enable -Wctad-maybe-unsupported in LLVM build

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Aug 13 03:45:06 PDT 2022


Mordante added a comment.

I've only looked at the libc++ changes.

I'm quite wary of these changes for libc++. Adding deduction guides to public types are essentially C++ Standard library extensions. Maybe we should first discuss this further on Discourse.

In D131727#3720507 <https://reviews.llvm.org/D131727#3720507>, @dblaikie wrote:

> In D131727#3720405 <https://reviews.llvm.org/D131727#3720405>, @jloser wrote:
>
>> In D131727#3720366 <https://reviews.llvm.org/D131727#3720366>, @dblaikie wrote:
>>
>>> Still open to ideas as to what to do with libc++. I mean it seems it's only a warning and not an error there, even in an `LLVM_ENABLE_WERROR` build, so maybe it can be committed as-is? But I'm not sure/wouldn't mind a libc++ developer to weigh in. (@ldionne?)
>>
>> Do you have some examples of `libc++` code that this new warning flags? I'm happy to take a look.
>
> My concern is it looks more like some cases of warning false positive, possibly because of the way libc++ builds itself (does it `#define _VSTD` to be empty or something other than `std` for its own test builds, perhaps, so as not to interfere with the system compiler's standard library entities?) - which might be thwarting the warning's general suppression for standard library things.

`_VSTD` expands to `std`, in newer code we use `std` directly. I expect the problem stems from that libc++ isn't included as system include in our tests.



================
Comment at: libcxx/include/__iterator/back_insert_iterator.h:63
+template <typename _Container>
+back_insert_iterator(_Container&) -> back_insert_iterator<_Container>;
+
----------------
This breaks C++03, C++11, and C++14 since it doesn't support CTAD.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131727/new/

https://reviews.llvm.org/D131727



More information about the libcxx-commits mailing list