variant.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
  3. // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
  4. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
  5. // This file was modified by Oracle on 2018.
  6. // Modifications copyright (c) 2018, Oracle and/or its affiliates.
  7. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  8. // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
  9. // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
  10. // Use, modification and distribution is subject to the Boost Software License,
  11. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  12. // http://www.boost.org/LICENSE_1_0.txt)
  13. #ifndef BOOST_GEOMETRY_GEOMETRIES_VARIANT_GEOMETRY_HPP
  14. #define BOOST_GEOMETRY_GEOMETRIES_VARIANT_GEOMETRY_HPP
  15. #include <boost/mpl/front.hpp>
  16. #include <boost/variant/variant_fwd.hpp>
  17. #include <boost/geometry/core/point_type.hpp>
  18. namespace boost { namespace geometry {
  19. template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
  20. struct point_type<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
  21. : point_type<
  22. typename boost::mpl::front<
  23. typename boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>::types
  24. >::type
  25. >
  26. {};
  27. } // namespace geometry
  28. } // namespace boost
  29. #endif // BOOST_GEOMETRY_GEOMETRIES_VARIANT_GEOMETRY_HPP