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_CONST_RVALUE_DETECTION
17
// ignore error during Microsoft Code Analysis
18
#if !defined(_PREFAST_)
19
# error Expected failure : const rvalues disallowed
23
static std::vector<int> const get_vector()
25
return std::vector<int>(4, 4);
28
///////////////////////////////////////////////////////////////////////////////
31
BOOST_AUTO_TEST_CASE( rvalue_const_r )
35
BOOST_REVERSE_FOREACH(int i, get_vector())
40
BOOST_CHECK(16 == counter);