3 // Copyright (c) 2017, Oracle and/or its affiliates.
4 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
6 // Use, modification and distribution is subject to the Boost Software License,
7 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
10 #ifndef BOOST_GEOMETRY_PROJECTIONS_CODE_HPP
11 #define BOOST_GEOMETRY_PROJECTIONS_CODE_HPP
18 namespace boost { namespace geometry { namespace projections
22 #ifndef DOXYGEN_NO_DETAIL
29 std::string proj4_str;
32 struct code_element_less
34 inline bool operator()(code_element const& l, code_element const& r) const
36 return l.code < r.code;
40 template<typename RandIt>
41 inline RandIt binary_find_code_element(RandIt first, RandIt last, int code)
43 code_element_less comp;
46 first = std::lower_bound(first, last, value, code_element_less());
47 return first != last && !comp(value, *first) ? first : last;
51 #endif // DOXYGEN_NO_DETAIL
54 }}} // namespace boost::geometry::projections