]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/range/test/compile_fail/adaptor/sliced_concept.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / range / test / compile_fail / adaptor / sliced_concept.cpp
1 // Boost.Range library
2 //
3 // Copyright Neil Groves 2014. Use, modification and distribution is subject
4 // to the Boost Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //
8 // For more information, see http://www.boost.org/libs/range
9 //
10
11 #include "mock_range.hpp"
12 #include <boost/range/adaptor/sliced.hpp>
13
14 int main(int, const char**)
15 {
16 using boost::range::unit_test::mock_range;
17 using boost::adaptors::sliced;
18
19 // This next line should fail when Boost.Range concept checking is
20 // enabled since the adaptor takes at least a RandomAccessRange.
21 return (mock_range<boost::bidirectional_traversal_tag>() |
22 sliced(0,1)).front();
23 }