]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // |
2 | // Test that an rvalue can't be passed to ref() | |
3 | // | |
4 | // Copyright 2014 Agustin Berge | |
5 | // | |
6 | // Distributed under the Boost Software License, Version 1.0. | |
7 | // See accompanying file LICENSE_1_0.txt or copy at | |
8 | // http://www.boost.org/LICENSE_1_0.txt | |
9 | // | |
10 | ||
11 | #include <boost/ref.hpp> | |
12 | ||
13 | int main() | |
14 | { | |
15 | boost::reference_wrapper<int> r = boost::ref( 2 ); // this should produce an ERROR | |
b32b8144 | 16 | (void)r; |
7c673cae | 17 | } |