mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
19 lines
329 B
D
19 lines
329 B
D
static immutable templ(alias var) = 1234;
|
|
|
|
struct D
|
|
{
|
|
int memvar;
|
|
}
|
|
|
|
extern(C++) struct CPP
|
|
{
|
|
int memvar;
|
|
}
|
|
|
|
void test()
|
|
{
|
|
static assert(templ!(D.memvar) == 1234);
|
|
static assert(templ!(CPP.memvar) == 1234);
|
|
// ICE: root cause, C++ member variables have no mangling
|
|
enum CPPmemvar = CPP.memvar.mangleof;
|
|
}
|