1 // RUN: %clang_cc1 -verify %s -std=c++14 2 3 template<const int I> struct S { // expected-error {{reference member 'r' binds to a temporary object}} 4 decltype(I) n; 5 int &&r = I; // expected-note {{default member initializer}} 6 }; 7 S<5> s; // expected-note {{implicit default constructor}} 8 9 template<typename T, T v> struct U { // expected-error {{reference member 'r' binds to a temporary object}} 10 decltype(v) n; 11 int &&r = v; // expected-note {{default member initializer}} 12 }; 13 U<const int, 6> u; // expected-note {{implicit default constructor}} 14