- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[cpp]
% cat test.ii
extern "C" typedef
bool (*IsAcceptableThis) (const int &v);
typedef bool (*NativeImpl) (int *, int);
template < IsAcceptableThis, NativeImpl > void CallNonGenericMethod ();
typedef int (*JSNative) (int *, unsigned, int *);
typedef struct
{
JSNative op;
}
JSNativeWrapper;
struct A
{
JSNativeWrapper a;
};
struct B
{
};
template < typename NativeType > class C:B
{
public:
NativeType ThisType;
typedef C ThisTypeArray;
static bool IsThisClass (const int &v);
static bool fun_subarray_impl (int *, int);
static int fun_subarray (int *, unsigned, int *)
{
CallNonGenericMethod < ThisTypeArray::IsThisClass,
ThisTypeArray::fun_subarray_impl > ();
return 0;
}
};
class D:public C < int >
{
};
A a[] = { D::fun_subarray };
% icpc test.ii
test.ii(4): internal error: assertion failed: lower_constant: bad kind (shared/cfe/edgcpfe/lower_il.c, line 5315)
template < IsAcceptableThis, NativeImpl > void CallNonGenericMethod ();
^
compilation aborted for test.ii (code 4)
% icpc -v
icpc version 13.0.0 (gcc version 4.7.0 compatibility)
[/cpp]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page