- Joined
- Feb 26, 2008
- Messages
- 1
- Reaction score
- 0
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;
func<int>(val);
}
#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;
func<int>(val);
}