Sun studio workaround for callback testcase
This commit is contained in:
parent
d834202695
commit
e44e3d3e39
1 changed files with 16 additions and 0 deletions
|
|
@ -57,6 +57,22 @@
|
||||||
return pf(a);
|
return pf(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__SUNPRO_CC)
|
||||||
|
// workaround for: Error: Could not find a match for foobar_T<T>(int, extern "C" int(*)(int)).
|
||||||
|
extern "C" {
|
||||||
|
typedef int (*foobar_int_int)(int a);
|
||||||
|
typedef double (*foobar_double_double)(double a);
|
||||||
|
};
|
||||||
|
template <class T>
|
||||||
|
int foobar_T(int a, foobar_int_int pf) {
|
||||||
|
return pf(a);
|
||||||
|
}
|
||||||
|
template <class T>
|
||||||
|
double foobar_T(double a, foobar_double_double pf) {
|
||||||
|
return pf(a);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
const T& ident(const T& x) {
|
const T& ident(const T& x) {
|
||||||
return x;
|
return x;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue