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