aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/offsetof1.C
blob: 1ee9be1e31a03915659ca752daec9adfcab644d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do compile }
// PR c++/17221

#include <cstddef>

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>;