Re: [algogeeks] templates overloading

2010-05-25 Thread Anil C R
let's break up that line you have in the end: int(*f)(char) = (int(*)(char))foo ; f('a') ; it becomes clear that f has a return type of int. So the ambiguity is resolved... Anil On Tue, May 25, 2010 at 2:25 PM, Anil C R wrote: > > Out of curiosity why would you do something like this? > Anil >

Re: [algogeeks] templates overloading

2010-05-25 Thread Anil C R
Out of curiosity why would you do something like this? Anil On Tue, May 25, 2010 at 12:45 PM, Modeling Expert < cs.modelingexp...@gmail.com> wrote: > If we have templatized functions , return type becomes part of > function signature ( which is not the case when we have normal non- > templatized

[algogeeks] templates overloading

2010-05-25 Thread Modeling Expert
If we have templatized functions , return type becomes part of function signature ( which is not the case when we have normal non- templatized functions ) , So we can have two functions like these who differ only in return type template int foo(T) { cout << " this " ; } template bool foo(T) { cou