]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Boost.Geometry (aka GGL, Generic Geometry Library) |
2 | // Unit Test | |
3 | ||
4 | // Copyright (c) 2014 Samuel Debionne, Grenoble, France. | |
5 | ||
6 | // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library | |
7 | // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. | |
8 | ||
9 | // Use, modification and distribution is subject to the Boost Software License, | |
10 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
11 | // http://www.boost.org/LICENSE_1_0.txt) | |
12 | ||
13 | ||
14 | #include <geometry_test_common.hpp> | |
15 | ||
16 | #include <boost/geometry/core/reverse_dispatch.hpp> | |
17 | #include <boost/geometry/core/tag_cast.hpp> | |
18 | ||
19 | #include <boost/geometry/geometries/point_xy.hpp> | |
20 | #include <boost/geometry/strategies/tags.hpp> | |
21 | ||
22 | #include <boost/geometry/algorithms/not_implemented.hpp> | |
23 | ||
24 | #include <boost/geometry/util/is_implemented.hpp> | |
25 | ||
26 | #include <boost/type_traits/is_same.hpp> | |
27 | #include <boost/mpl/assert.hpp> | |
28 | #include <boost/mpl/bool.hpp> | |
29 | ||
30 | ||
31 | namespace boost { namespace geometry | |
32 | { | |
33 | ||
34 | namespace strategy { namespace services | |
35 | { | |
36 | ||
37 | ||
38 | template <typename Strategy> struct tag | |
39 | { | |
40 | ||
41 | typedef not_implemented type; | |
42 | ||
43 | }; | |
44 | ||
45 | }} // namespace strategy::services | |
46 | ||
47 | ||
48 | template | |
49 | < | |
50 | typename Geometry1, typename Geometry2, | |
51 | typename Strategy, | |
52 | typename Tag1 = typename tag_cast<typename tag<Geometry1>::type, multi_tag>::type, | |
53 | typename Tag2 = typename tag_cast<typename tag<Geometry2>::type, multi_tag>::type, | |
54 | typename StrategyTag = typename strategy::services::tag<Strategy>::type, | |
55 | bool Reverse = reverse_dispatch<Geometry1, Geometry2>::type::value | |
56 | > | |
57 | struct algorithm_archetype | |
58 | : not_implemented<> | |
59 | {}; | |
60 | ||
61 | ||
62 | struct strategy_archetype | |
63 | { | |
64 | template <typename Geometry1, typename Geometry2> | |
65 | static void apply(Geometry1, Geometry2) {} | |
66 | }; | |
67 | ||
68 | ||
69 | }} // namespace boost::geometry | |
70 | ||
71 | ||
72 | int test_main(int, char* []) | |
73 | { | |
74 | typedef bg::model::d2::point_xy<double> point_type; | |
75 | ||
76 | BOOST_MPL_ASSERT(( | |
1e59de90 | 77 | std::is_same< |
7c673cae FG |
78 | bg::util::is_implemented2 |
79 | < | |
80 | point_type, point_type, | |
81 | bg::algorithm_archetype<point_type, point_type, bg::strategy_archetype> | |
82 | >::type, | |
83 | boost::mpl::false_ | |
1e59de90 | 84 | >::value |
7c673cae FG |
85 | )); |
86 | ||
87 | return 0; | |
88 | } |