This file is indexed.

/usr/include/boost/range/adaptor/filtered.hpp is in libboost1.49-dev 1.49.0-3.2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
// Boost.Range library
//
//  Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. Use, modification and
//  distribution is subject to the Boost Software License, Version
//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
//  http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boost.org/libs/range/
//

#ifndef BOOST_RANGE_ADAPTOR_FILTERED_HPP
#define BOOST_RANGE_ADAPTOR_FILTERED_HPP

#include <boost/range/adaptor/argument_fwd.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/iterator/filter_iterator.hpp>

namespace boost
{
    namespace range_detail
    {
        template< class P, class R >
        struct filtered_range :
            boost::iterator_range<
                boost::filter_iterator< P,
                    BOOST_DEDUCED_TYPENAME range_iterator<R>::type
                >
            >
        {
        private:
            typedef boost::iterator_range<
                        boost::filter_iterator< P,
                            BOOST_DEDUCED_TYPENAME range_iterator<R>::type
                        >
                    > base;
        public:
            filtered_range( P p, R& r )
            : base( make_filter_iterator( p, boost::begin(r), boost::end(r) ),
                    make_filter_iterator( p, boost::end(r), boost::end(r) ) )
            { }
        };

        template< class T >
        struct filter_holder : holder<T>
        {
            filter_holder( T r ) : holder<T>(r)
            { }
        };

        template< class InputRng, class Predicate >
        inline filtered_range<Predicate, InputRng>
        operator|( InputRng& r,
                   const filter_holder<Predicate>& f )
        {
            return filtered_range<Predicate, InputRng>( f.val, r );
        }

        template< class InputRng, class Predicate >
        inline filtered_range<Predicate, const InputRng>
        operator|( const InputRng& r,
                   const filter_holder<Predicate>& f )
        {
            return filtered_range<Predicate, const InputRng>( f.val, r );
        }

    } // 'range_detail'

    // Unusual use of 'using' is intended to bring filter_range into the boost namespace
    // while leaving the mechanics of the '|' operator in range_detail and maintain
    // argument dependent lookup.
    // filter_range logically needs to be in the boost namespace to allow user of
    // the library to define the return type for filter()
    using range_detail::filtered_range;

    namespace adaptors
    {
        namespace
        {
            const range_detail::forwarder<range_detail::filter_holder>
                    filtered =
                       range_detail::forwarder<range_detail::filter_holder>();
        }

        template<class InputRange, class Predicate>
        inline filtered_range<Predicate, InputRange>
        filter(InputRange& rng, Predicate filter_pred)
        {
            return range_detail::filtered_range<Predicate, InputRange>( filter_pred, rng );
        }

        template<class InputRange, class Predicate>
        inline filtered_range<Predicate, const InputRange>
        filter(const InputRange& rng, Predicate filter_pred)
        {
            return range_detail::filtered_range<Predicate, const InputRange>( filter_pred, rng );
        }
    } // 'adaptors'

}

#endif