By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,431 Members | 1,755 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,431 IT Pros & Developers. It's quick & easy.

template function

P: n/a
When I feed this to my compiler (gcc 3.2) I got the following error
message. Whats wrong?
thanks,
marc

template <typename T>
typename T::ty AssureScalar( EnvT* e, size_t pIx)
{
typename T::ty scalar;
bool isScalar= e->Scalar( scalar);
return scalar;
}

void call( EnvT* e)
{
DString callP = AssureScalar<StringType>( (EnvT*) e, (size_t) 0);
}


basic_pro.cpp:141: no matching function for call to `AssureScalar(EnvT*,
size_t)'

Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Marc Schellens" <m_*********@hotmail.com> wrote...
When I feed this to my compiler (gcc 3.2) I got the following error
message. Whats wrong?
When I feed this to my compiler (gcc 3.2) I get much more errors.
First of them is "EnvT undefined". Care to post complete code?
thanks,
marc

template <typename T>
typename T::ty AssureScalar( EnvT* e, size_t pIx)
{
typename T::ty scalar;
bool isScalar= e->Scalar( scalar);
return scalar;
}

void call( EnvT* e)
{
DString callP = AssureScalar<StringType>( (EnvT*) e, (size_t) 0);
}


basic_pro.cpp:141: no matching function for call to `AssureScalar(EnvT*,
size_t)'

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.