Imported Upstream version 1.64.0
[platform/upstream/boost.git] / boost / geometry / algorithms / detail / throw_on_empty_input.hpp
index 2f82e1a..3d45a46 100644 (file)
@@ -3,6 +3,7 @@
 // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
 // Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
 // Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
 
 // This file was modified by Oracle on 2015.
 // Modifications copyright (c) 2015, Oracle and/or its affiliates.
 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_THROW_ON_EMPTY_INPUT_HPP
 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_THROW_ON_EMPTY_INPUT_HPP
 
+
 #include <boost/geometry/core/exception.hpp>
 #include <boost/geometry/algorithms/is_empty.hpp>
 
+#include <boost/throw_exception.hpp>
+
+
 // BSG 2012-02-06: we use this currently only for distance.
 // For other scalar results area,length,perimeter it is commented on purpose.
 // Reason is that for distance there is no other choice. distance of two
@@ -46,7 +51,7 @@ inline void throw_on_empty_input(Geometry const& geometry)
 #if ! defined(BOOST_GEOMETRY_EMPTY_INPUT_NO_THROW)
     if (geometry::is_empty(geometry))
     {
-        throw empty_input_exception();
+        BOOST_THROW_EXCEPTION(empty_input_exception());
     }
 #else
     boost::ignore_unused(geometry);