This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
question on std :: initializer_list
- From: Graziano Servizi <Graziano dot Servizi at bo dot infn dot it>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 19 Feb 2014 10:29:26 +0100
- Subject: question on std :: initializer_list
- Authentication-results: sourceware.org; auth=none
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