This file is indexed.

/usr/include/boost/geometry/strategies/compare.hpp is in libboost1.54-dev 1.54.0-4ubuntu3.

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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
// Boost.Geometry (aka GGL, Generic Geometry Library)

// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.

// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.

// 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)


#ifndef BOOST_GEOMETRY_STRATEGIES_COMPARE_HPP
#define BOOST_GEOMETRY_STRATEGIES_COMPARE_HPP

#include <cstddef>
#include <functional>

#include <boost/mpl/if.hpp>

#include <boost/geometry/core/cs.hpp>
#include <boost/geometry/core/coordinate_type.hpp>

#include <boost/geometry/strategies/tags.hpp>


namespace boost { namespace geometry
{


/*!
    \brief Traits class binding a comparing strategy to a coordinate system
    \ingroup util
    \tparam Tag tag of coordinate system of point-type
    \tparam Direction direction to compare on: 1 for less (-> ascending order)
        and -1 for greater (-> descending order)
    \tparam Point point-type
    \tparam CoordinateSystem coordinate sytem of point
    \tparam Dimension: the dimension to compare on
*/
template
<
    typename Tag,
    int Direction,
    typename Point,
    typename CoordinateSystem,
    std::size_t Dimension
>
struct strategy_compare
{
    typedef strategy::not_implemented type;
};


#ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS

// For compare we add defaults specializations,
// because they defaultly redirect to std::less / greater / equal_to
template
<
    typename Tag,
    typename Point,
    typename CoordinateSystem,
    std::size_t Dimension
>
struct strategy_compare<Tag, 1, Point, CoordinateSystem, Dimension>
{
    typedef std::less<typename coordinate_type<Point>::type> type;
};


template
<
    typename Tag,
    typename Point,
    typename CoordinateSystem,
    std::size_t Dimension
>
struct strategy_compare<Tag, -1, Point, CoordinateSystem, Dimension>
{
    typedef std::greater<typename coordinate_type<Point>::type> type;
};


template
<
    typename Tag,
    typename Point,
    typename CoordinateSystem,
    std::size_t Dimension
>
struct strategy_compare<Tag, 0, Point, CoordinateSystem, Dimension>
{
    typedef std::equal_to<typename coordinate_type<Point>::type> type;
};


#endif


namespace strategy { namespace compare
{


/*!
    \brief Default strategy, indicates the default strategy for comparisons
    \details The default strategy for comparisons defer in most cases
        to std::less (for ascending) and std::greater (for descending).
        However, if a spherical coordinate system is used, and comparison
        is done on longitude, it will take another strategy handling circular
*/
struct default_strategy {};


#ifndef DOXYGEN_NO_DETAIL
namespace detail
{

template <typename Type>
struct is_default : boost::false_type
{};


template <>
struct is_default<default_strategy> : boost::true_type
{};


/*!
    \brief Meta-function to select strategy
    \details If "default_strategy" is specified, it will take the
        traits-registered class for the specified coordinate system.
        If another strategy is explicitly specified, it takes that one.
*/
template
<
    typename Strategy,
    int Direction,
    typename Point,
    std::size_t Dimension
>
struct select_strategy
{
    typedef typename
        boost::mpl::if_
        <
            is_default<Strategy>,
            typename strategy_compare
            <
                typename cs_tag<Point>::type,
                Direction,
                Point,
                typename coordinate_system<Point>::type,
                Dimension
            >::type,
            Strategy
        >::type type;
};

} // namespace detail
#endif // DOXYGEN_NO_DETAIL


}} // namespace strategy::compare


}} // namespace boost::geometry


#endif // BOOST_GEOMETRY_STRATEGIES_COMPARE_HPP