 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Sun May 20, 2007 10:19 pm Post subject: What's the rationale of not allowing this usage[template ali |
|
|
template<typename T>
using Vec = std::vector<T, allocator<T>>;
template<template<typename> class TT>
struct S;
S<Vec>;
It will solve the long-standed problem of not being able to default
some parameter of a template and treat it like one with fewer
parameters.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
Alberto Ganesh Barbati Guest
|
Posted: Mon May 21, 2007 3:05 am Post subject: Re: What's the rationale of not allowing this usage[template |
|
|
pongba (AT) gmail (DOT) com ha scritto:
| Quote: | template<typename T
using Vec = std::vector<T, allocator<T>>;
template<template<typename> class TT
struct S;
S<Vec>;
It will solve the long-standed problem of not being able to default
some parameter of a template and treat it like one with fewer
parameters.
|
AFAIK, it *is* allowed. I may be wrong, but that's how I interpret
14.3.3/1 in the latest draft (with emphasis added): "A template-argument
for a template template-parameter shall be the name of a class template
*or a template alias*, expressed as id-expression."
What makes you think it isn't allowed?
Ganesh
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|