1
0
forked from boostorg/core
Files
boost_core/test/ref_rv_fail2.cpp

17 lines
375 B
C++
Raw Normal View History

2014-06-10 03:26:09 +03:00
//
// Test that an rvalue can't be passed to ref()
//
// Copyright 2014 Agustin Berge
//
2014-06-10 03:26:09 +03:00
// 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()
{
2014-06-10 03:26:09 +03:00
boost::reference_wrapper<int> r = boost::ref( 2 ); // this should produce an ERROR
}