C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What's the rationale of not allowing this usage[template ali

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language, library and standards
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Sun May 20, 2007 10:19 pm    Post subject: What's the rationale of not allowing this usage[template ali Reply with 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.

---
[ 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





PostPosted: Mon May 21, 2007 3:05 am    Post subject: Re: What's the rationale of not allowing this usage[template Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language, library and standards All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.