summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/sizeof4.C
blob: 4856a2741f32b420112657d8fc96df3c3bc632a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// { dg-do compile }
// Origin: <anthwil at nortelnetworks dot com>
// c++/4933: using sizeof with comma operator as template argument

template<unsigned F>
struct Foo {};

template<typename T>
T makeT();

template<typename T,typename U>
struct Bar
{
  typedef Foo
  <
    sizeof((makeT<T>(), makeT<U>()))
  > Type;
};