This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: question on std :: initializer_list


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]