This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: question on std :: initializer_list
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Graziano Servizi <Graziano dot Servizi at bo dot infn dot it>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Wed, 19 Feb 2014 09:31:41 +0000
- Subject: Re: question on std :: initializer_list
- Authentication-results: sourceware.org; auth=none
- References: <53047976 dot 5070605 at bo dot infn dot it>
On 19 February 2014 09:29, Graziano Servizi wrote:
> Hi, everybody.
>
> I would ask how to specialize the template class in subject.
Don't.
std::initializer_list is a magic type and if you try to specialize it
then chaos will ensue.
Just don't.
> I tried this
>
> namespace std {
>
> template <> class initializer_list<SomeTypeOfMine>
> {
> public:
> initializer_list<SomeTypeOfMine> (initializer_list<const char *> il)
Constructors do not take template argument lists.