Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > call of overloaded func() is ambiguous - Erron in gcc

Thread Tools

call of overloaded func() is ambiguous - Erron in gcc

vinay.muthyal vinay.muthyal is offline
Junior Member
Join Date: Feb 2008
Posts: 1
Following piece of code , is getting compilation error in gcc344 , can any one help how to get ride of this...

#include <iostream>

template<class ValueType, int SomeValue>
struct TS

template<class ReturnType, class ArgType>
ReturnType func(const ArgType& f_arg)
return static_cast<ReturnType>(0);

template<class ReturnType, class ValueType, int SomeValue>
ReturnType func(const TS<ValueType, SomeValue>& f_arg)
return static_cast<ReturnType>(1);

int main()
TS<int, 10> val;
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ambiguous call to overloaded template function Ruki C++ 1 06-30-2008 08:00 AM
Ambiguous call to overloaded function Joseph Turian C++ 4 12-20-2007 11:24 AM
ambiguous call to overloaded function, India C++ 1 09-10-2007 04:00 AM
[VC++ 6.0] Ambiguous call to overloaded function rolandz C++ 5 07-04-2006 02:20 PM
ambiguous call to overloaded ishekara C++ 7 02-25-2005 09:27 PM