Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-15 08:38:51

0001 // (C) Copyright David Abrahams 2002.
0002 // (C) Copyright Jeremy Siek    2002.
0003 // (C) Copyright Thomas Witt    2002.
0004 // Distributed under the Boost Software License, Version 1.0. (See
0005 // accompanying file LICENSE_1_0.txt or copy at
0006 // http://www.boost.org/LICENSE_1_0.txt)
0007 
0008 // no include guard multiple inclusion intended
0009 
0010 //
0011 // This is a temporary workaround until the bulk of this is
0012 // available in boost config.
0013 // 23/02/03 thw
0014 //
0015 
0016 #include <boost/config.hpp> // for prior
0017 #include <boost/detail/workaround.hpp>
0018 
0019 #ifdef BOOST_ITERATOR_CONFIG_DEF
0020 # error you have nested config_def #inclusion.
0021 #else
0022 # define BOOST_ITERATOR_CONFIG_DEF
0023 #endif
0024 
0025 // We enable this always now.  Otherwise, the simple case in
0026 // libs/iterator/test/constant_iterator_arrow.cpp fails to compile
0027 // because the operator-> return is improperly deduced as a non-const
0028 // pointer.
0029 
0030 // Recall that in general, compilers without partial specialization
0031 // can't strip constness.  Consider counting_iterator, which normally
0032 // passes a const Value to iterator_facade.  As a result, any code
0033 // which makes a std::vector of the iterator's value_type will fail
0034 // when its allocator declares functions overloaded on reference and
0035 // const_reference (the same type).
0036 //
0037 // Furthermore, Borland 5.5.1 drops constness in enough ways that we
0038 // end up using a proxy for operator[] when we otherwise shouldn't.
0039 // Using reference constness gives it an extra hint that it can
0040 // return the value_type from operator[] directly, but is not
0041 // strictly necessary.  Not sure how best to resolve this one.
0042 
0043 # define BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY 1
0044 
0045 // no include guard; multiple inclusion intended