Richard Henderson wrote:
Yaye. This was easier than I thought. All it takes for C++ is to
delay resolution in the template case.
Does this compile:
---------------------------------
#include <stddef.h>
template <int N> struct Bar;
template <> struct Bar<3> {};
template <class T>
struct Foo {
Bar<offsetof(T, a) + 3> k;
};
struct A { int a; };
template struct Foo<A>;
---------------------------------
I quickly grepped g++.dg and I could not find a similar test. Maybe
you can
add it, if/when it works.