jeudi 13 août 2020

How to expand parameter pack for dependent types? [duplicate]

What is the syntax for expanding a parameter pack where the types I want are dependent on the types directly in the pack?

For example:

template <typename T>
struct foo
{
   typedef T value_type;
};

template <typename ... T>
struct aggregate_of_foo
{
   typedef std::tuple<foo<T>::value_type...> tuple; // MSVC compiler error here
};

Aucun commentaire:

Enregistrer un commentaire