1// PR c++/48453, DR 1287 2// { dg-do compile { target c++11 } } 3 4template<class T> 5T&& create(); 6 7template<class T, class Arg> 8void test() { 9 T t(create<Arg>()); 10 (void) t; 11} 12 13template<class T> 14struct To { 15 explicit operator T(); 16}; 17 18int main() 19{ 20 test<int&, To<int&>>(); 21 test<int&&, To<int&&>>(); 22} 23