468,249 Members | 1,448 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,249 developers. It's quick & easy.

static member template

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<charmeta(20);

i get a no matching function error...

thanks & hand, chris
Jun 27 '08 #1
3 1170
Chris Forone schrieb:
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<charmeta(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...
Jun 27 '08 #2
Chris Forone schrieb:
Chris Forone schrieb:
>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<charmeta(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...
Ok, if i include the .cpp file rather the .h file, then it goes...
Jun 27 '08 #3
Chris Forone wrote:
....
Ok, if i include the .cpp file rather the .h file, then it goes...
The is an FAQ about this one. Check it out.
Jun 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Drew McCormack | last post: by
5 posts views Thread by mast2as | last post: by
17 posts views Thread by Juha Nieminen | last post: by
5 posts views Thread by chgans | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.