[test] Replace BOOST_CONCEPT_REQUIRES with BOOST_CONCEPT_ASSERT.

The former doesn't fail as expected on some platforms.
Furthermore the latter is used in the library.
This commit is contained in:
Adam Wulkiewicz 2016-01-14 22:10:49 +01:00
parent 13a12471c1
commit 44d736d5ff

View File

@ -1,7 +1,8 @@
// Boost.Geometry (aka GGL, Generic Geometry Library) Point concept unit tests
//
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2016 Bruno Lalande, Paris, France.
// Copyright (c) 2007-2016 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2016 Adam Wulkiewicz, Lodz, Poland.
// 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)
@ -9,8 +10,6 @@
#ifndef GEOMETRY_TEST_POINT_CONCEPT_FUNCTION_REQUIRING_A_POINT_HPP
#define GEOMETRY_TEST_POINT_CONCEPT_FUNCTION_REQUIRING_A_POINT_HPP
#include <boost/concept/requires.hpp>
#include <boost/geometry/geometries/concepts/point_concept.hpp>
namespace bg = boost::geometry;
@ -18,13 +17,11 @@ namespace bg = boost::geometry;
namespace test
{
template <typename P, typename C>
inline BOOST_CONCEPT_REQUIRES(
((bg::concept::Point<P>))
((bg::concept::ConstPoint<C>)),
(void))
function_requiring_a_point(P& p1, const C& p2)
inline void function_requiring_a_point(P& p1, const C& p2)
{
BOOST_CONCEPT_ASSERT((bg::concept::Point<P>));
BOOST_CONCEPT_ASSERT((bg::concept::ConstPoint<C>));
bg::set<0>(p1, bg::get<0>(p2));
}
}