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]

question on std :: initializer_list


Hi, everybody.

I would ask how to specialize the template class in subject.
I tried this

namespace std {

template <> class initializer_list<SomeTypeOfMine>
  {
   public:
   initializer_list<SomeTypeOfMine> (initializer_list<const char *> il)
      {
       // trying to provide a constructor from an initializer_list
       // made of literal quoted strings
       // here follows a "tentative" to declare an iterator

       const SomeTypeOfMine * ii = begin(???????);

       //  what there?
       }
   };

}


My 4.8.2 compiler claims either that begin is NOT a member of initializer_list<SomeTypeOfMine> (when I leave the parameter list empty) or that there is a failure in template type deduction (when I put a single parameter in place of the question marks). I checked "this" as well as "*this" and none works... what else?

Am I completely out of way?

Thanks in advance for your attention.

G. Servizi


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