~shimon/dismaltc

ref: 461e0617cb03f1d5027af4fbb3da0722791022e9 dismaltc/clang/disable-test/CXX/temp/temp.param/p5.cpp -rw-r--r-- 548 bytes
461e0617Itoh Shimon re-enable tests. 1 year, 11 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_cc1 -verify %s -std=c++14

template<const int I> struct S { // expected-error {{reference member 'r' binds to a temporary object}}
  decltype(I) n;
  int &&r = I; // expected-note {{default member initializer}}
};
S<5> s; // expected-note {{implicit default constructor}}

template<typename T, T v> struct U { // expected-error {{reference member 'r' binds to a temporary object}}
  decltype(v) n;
  int &&r = v; // expected-note {{default member initializer}}
};
U<const int, 6> u; // expected-note {{implicit default constructor}}