1 // (C) Copyright Beman Dawes 2009
3 // Use, modification and distribution are subject to the
4 // Boost Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // See http://www.boost.org/libs/config for more information.
9 // MACRO: BOOST_NO_RESTRICT_REFERENCES
10 // TITLE: We cannot apply BOOST_RESTRICT to a reference type.
11 // DESCRIPTION: We cannot apply BOOST_RESTRICT to a reference type
13 #include <boost/config.hpp>
15 namespace boost_no_restrict_references {
18 #pragma warning(error:4227)
22 void sum2(int (& BOOST_RESTRICT a)[4], int (& BOOST_RESTRICT b)[4], int (&c)[4], int (&d)[4]) {
24 for (i = 0; i < 4; i++) {
32 int a[4] = { 1, 2, 3, 4 };
33 int b[4] = { 3, 4, 5, 6 };
34 int c[4] = { 0, 1, 3, 5 };
35 int d[4] = { 2, 4, 6, 8 };
43 #pragma warning(default:4227)