C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Named auto

From: Peter Olsson <dataapa_at_[hidden]>
Date: Fri, 30 Sep 2022 15:21:15 +0200
I wonder how this would interact with alias templates.

template <typename T>
using pointer_vector = std::vector<T*>;

auto<T> vec = std::vector<int*>();

Is T deduced as int or int* ?

Whatever the answer is, couldn't that be confusing? Would I need to know
whether something is a class template or an alias template before using
this syntax?

Received on 2022-09-30 13:21:28