Disable binding ref to temporaries when rvalue references are supported

This commit is contained in:
K-ballo committed 2014-06-09 20:42:00 -03:00
1 parent af629ffa59
commit 45f7564db2
5 files changed
+100

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
// Copyright 2002-2004 David Abrahams and Aleksey Gurtovoy
// Copyright 2014 Agustin Berge
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <boost/ref.hpp>
int main()
{
boost::reference_wrapper<int> r = boost::ref(2); // this should produce an ERROR
return 0;
}