1// Copyright Beman Dawes 2012 2 3// Distributed under the Boost Software License, Version 1.0. 4// See http://www.boost.org/LICENSE_1_0.txt 5 6// See http://www.boost.org/libs/config for more information. 7 8// MACRO: BOOST_NO_CXX11_RANGE_BASED_FOR 9// TITLE: C++11 ranged-based for statement unavailable 10// DESCRIPTION: The compiler does not support the C++11 range-based for statement 11 12namespace boost_no_cxx11_range_based_for { 13 14int test() 15{ 16 // example from 6.5.4 The range-based for statement [stmt.ranged] 17 int array[5] = { 1, 2, 3, 4, 5 }; 18 for (int& x : array) 19 x *= 2; 20 return 0; 21} 22 23} 24