static member template

C

Chris Forone

hello group,

whats wrong with following static member template:

class x
{
template<typename InputIterator, typename std::valarray<char>&>
static void Copy(InputIterator file, std::valarray<char>& store);
};

if i call:

Copy(std::istreambuf_iterator<char>(file), meta);

where meta = std::valarray<char> meta(20);

i get a no matching function error...

thanks & hand, chris
 
C

Chris Forone

Chris said:
hello group,

whats wrong with following static member template:

class x
{
template<typename InputIterator, typename std::valarray<char>&>
static void Copy(InputIterator file, std::valarray<char>& store);
};

if i call:

Copy(std::istreambuf_iterator<char>(file), meta);

where meta = std::valarray<char> meta(20);

i get a no matching function error...

thanks & hand, chris

class x
{
template<typename InputIterator>
static void Copy(InputIterator file, std::valarray<GLubyte>& store);
};

compiles but i get undefined references...
 
C

Chris Forone

Chris said:
class x
{
template<typename InputIterator>
static void Copy(InputIterator file, std::valarray<GLubyte>& store);
};

compiles but i get undefined references...

Ok, if i include the .cpp file rather the .h file, then it goes...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top