]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/foreach/test/dependent_type.cpp
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 26 August 2005 : Initial version.
12 #include <boost/core/lightweight_test.hpp>
13 #include <boost/foreach.hpp>
15 ///////////////////////////////////////////////////////////////////////////////
16 // use FOREACH to iterate over a sequence with a dependent type
17 template<typename Vector
>
18 void do_test(Vector
const & vect
)
20 typedef BOOST_DEDUCED_TYPENAME
Vector::value_type value_type
;
21 BOOST_FOREACH(value_type i
, vect
)
23 // no-op, just make sure this compiles
28 ///////////////////////////////////////////////////////////////////////////////
33 std::vector
<int> vect
;
36 return boost::report_errors();