Why is the following declaration invalid?
template<template<typename> typename T>
struct S {};
I would assume this was valid since the following is valid:
template<template<typename> class T>
struct S {};
and what I can read from the standard in [gram.temp] it appears to be valid, but gcc gives me the following output:
prog.cpp:4:38: error: expected 'class' before 'T'
template<template<typename> typename T>
^
Aucun commentaire:
Enregistrer un commentaire