Update contrib.
1 /* example for using class array<>
2 * (C) Copyright Nicolai M. Josuttis 2001.
3 * Distributed under the Boost Software License, Version 1.0. (See
4 * accompanying file LICENSE_1_0.txt or copy at
5 * http://www.boost.org/LICENSE_1_0.txt)
8 * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved.
13 #include <boost/array.hpp>
16 using namespace boost;
19 #include "std_log_result.h"
20 #define LOG_FILENAME_LINE __FILE__, __LINE__
25 std_log(LOG_FILENAME_LINE,"[Test Case for array2]");
28 // create and initialize array
29 array<int,10> a = { { 1, 2, 3, 4, 5 } };
33 // modify elements directly
34 for (unsigned i=0; i<a.size(); ++i) {
39 // change order using an STL algorithm
40 reverse(a.begin(),a.end());
43 // negate elements using STL framework
44 transform(a.begin(),a.end(), // source
45 a.begin(), // destination
46 negate<int>()); // operation
73 std_log(LOG_FILENAME_LINE,"Result : Failed");
77 std_log(LOG_FILENAME_LINE,"Result : Passed");
80 testResultXml("array2");
83 return 0; // makes Visual-C++ compiler happy