You cannot overload functions on C versus C++ linkage, but different linkages are different types. When you uncomment the first line, the second declaration of foo inherits the C linkage from the frist declaration of the same function. The template is declared to take a pointer to a function with C++ linkage, so you cannot instantiate it on a function with C linkage. -- This message posted from opensolaris.org
- [tools-compilers] A potential problem of Function Pointer a... Yong Sun
- [tools-compilers] A potential problem of Function Poin... Chris Quenelle
- [tools-compilers] A potential problem of Function Poin... Yong Sun
- [tools-compilers] A potential problem of Function ... Steve Clamage
- [tools-compilers] A potential problem of Funct... Yong Sun
- [tools-compilers] A potential problem of Funct... Yong Sun
- [tools-compilers] A potential problem of F... Steve Clamage
- [tools-compilers] A potential problem... Yong Sun
- [tools-compilers] A potential problem... Yong Sun
- [tools-compilers] A potential pro... Steve Clamage
