1
// (C) Copyright Eric Niebler 2005.
2
// Use, modification and distribution are subject to the
3
// Boost Software License, Version 1.0. (See accompanying file
4
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8
25 August 2005 : Initial version.
11
#include <mlib/tests/_pc_.h>
12
//#include <boost/test/minimal.hpp>
14
#include <boost/foreach.hpp>
16
#ifdef BOOST_FOREACH_NO_RVALUE_DETECTION
17
# error Expected failure : rvalues disallowed
20
static std::vector<int> get_vector()
22
return std::vector<int>(4, 4);
25
///////////////////////////////////////////////////////////////////////////////
28
BOOST_AUTO_TEST_CASE( rvalue_nonconst_r )
32
BOOST_REVERSE_FOREACH(int i, get_vector())
37
BOOST_CHECK(16 == counter);