[ create a new paste ] login | about

Link: http://codepad.org/QLBBsVoc    [ raw code | fork | 1 comment ]

uskz - C++, pasted on Sep 3:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>

struct foo_
{
    template <class T, class A>
    T* f(A& a) { return 0; }

    template <class T, class A>
    T* f(A const& a) { return 0; }
} foo;

int main()
{
    int const a = 0;
    foo.f<int>(a);
}


Output:
No errors or program output.


Create a new paste based on this one


Comments:
posted by uskz on Sep 5
gcc3.4.5ではこのoverload resolutionが曖昧になる
reply