https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105520

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
             Blocks|                            |67491
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-04-06

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

This works as expected, in that we are getting the correct type for auto here:
```
#include <concepts>
#include <initializer_list>

template <typename T>
concept always_true = true;

template <typename T>
concept always_false = false;

template <typename>
inline constexpr bool is_init_list_v = false;

template <typename T>
inline constexpr bool is_init_list_v<std::initializer_list<T>> = true;

template <typename T>
concept not_init_list = !is_init_list_v<std::remove_cvref_t<T>>;
template <typename T>
inline constexpr bool not_init_list1 = !is_init_list_v<std::remove_cvref_t<T>>;


int main() {
    auto f = {1, 2, 3};
    static_assert(!not_init_list<decltype(f)>);
    static_assert(!not_init_list1<decltype(f)>);
}
```


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues

Reply via email to