Topic: Unnamed types as template arguments


Author: Mathias Gaunard <loufoque@gmail.com>
Date: Wed, 20 Jan 2010 11:55:54 CST
Raw View
N2657 allows to pass unnamed types as template arguments:

template<typename T> struct some_template {};
typedef struct {} st;
some_template<st> a;

However, it is not possible to do

template<typename T> struct some_template {};
some_template<struct {}> a;

Is there any reason for allowing the first one but not the second one?

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]