repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
template
/
offsetof1.C
blob
1ee9be1e31a03915659ca752daec9adfcab644d6
1
// { dg-do compile }
2
// PR c++/17221
3
4
#include <cstddef>
5
6
template <int N> struct Bar;
7
template <> struct Bar<3> {};
8
9
template <class T>
10
struct Foo {
11
Bar<offsetof(T, a) + 3> k;
12
};
13
14
struct A { int a; };
15
16
template struct Foo<A>;