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

Richard Smith <richard-gccbugzilla at metafoo dot co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|can't initialize            |wrong auto deduction from
                   |std::vector<T> from         |braced-init-list
                   |auto-deduced type 'const    |
                   |std::initializer_list<T> &' |

--- Comment #1 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> ---
... deduced type. [Oops, hit 'enter' early.]

Even simpler testcase:

#include <initializer_list>
const auto r = { 1, 2, 3 };
using X = decltype(r);
using X = const std::initializer_list<int>;

fails because decltype(r) is deduced as 'const std::initializer_list<const
int>' rather than 'const std::initializer_list<int>'.

Reply via email to