remove CGAL/result_of.h and move its content to config.h

This commit is contained in:
Maxime Gimeno 2021-05-04 10:43:26 +02:00
parent e775ed2ebc
commit 9533a9fea8
7 changed files with 7 additions and 79 deletions

View File

@ -18,7 +18,6 @@
#include <CGAL/generators.h> #include <CGAL/generators.h>
#include <CGAL/Random.h> #include <CGAL/Random.h>
#include <CGAL/property_map.h> #include <CGAL/property_map.h>
#include <CGAL/result_of.h>
#include <vector> #include <vector>

View File

@ -623,7 +623,6 @@ using std::max;
# include <unordered_set> # include <unordered_set>
# include <unordered_map> # include <unordered_map>
# include <functional> # include <functional>
# include <CGAL/result_of.h>
// //
namespace CGAL { namespace CGAL {
// //
@ -642,6 +641,13 @@ namespace CGAL {
using std::is_enum; using std::is_enum;
using std::unordered_set; using std::unordered_set;
using std::unordered_map; using std::unordered_map;
#if CGAL_CXX20 || __cpp_lib_is_invocable>=201703L
template<typename Signature> class result_of;
template<typename F, typename... Args>
class result_of<F(Args...)> : public std::invoke_result<F, Args...> { };
#else
using std::result_of;
#endif
} }
// //
namespace cpp0x = cpp11; namespace cpp0x = cpp11;

View File

@ -22,7 +22,6 @@
#include <CGAL/basic.h> #include <CGAL/basic.h>
#include <CGAL/internal/Periodic_3_triangulation_iterators_3.h> #include <CGAL/internal/Periodic_3_triangulation_iterators_3.h>
#include <CGAL/result_of.h>
#include <CGAL/Periodic_3_triangulation_ds_cell_base_3.h> #include <CGAL/Periodic_3_triangulation_ds_cell_base_3.h>
#include <CGAL/Periodic_3_triangulation_ds_vertex_base_3.h> #include <CGAL/Periodic_3_triangulation_ds_vertex_base_3.h>
#include <CGAL/Periodic_3_triangulation_traits_3.h> #include <CGAL/Periodic_3_triangulation_traits_3.h>

View File

@ -24,7 +24,6 @@
#include <CGAL/intersections.h> #include <CGAL/intersections.h>
#include <CGAL/iterator.h> #include <CGAL/iterator.h>
#include <CGAL/result_of.h>
#include <CGAL/Timer.h> #include <CGAL/Timer.h>
#include <iterator> #include <iterator>

View File

@ -1,73 +0,0 @@
// Copyright (c) 2013
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Sebastien Loriot <sebastien.loriot@cgal.org>
#ifndef CGAL_RESULT_OF_H
#define CGAL_RESULT_OF_H
#include <CGAL/config.h>
#include <CGAL/disable_warnings.h>
#if CGAL_CXX20 || __cpp_lib_is_invocable>=201703L
// C++>=17
#elif CGAL_CXX11
#include <type_traits>
#else // C++<11
// Address the warning C4003: not enough actual parameters for macro 'BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY'
// result_of.hpp includes files from boost/preprocessor
// This concerns boost 1_65_1
#if defined(BOOST_MSVC)
#pragma warning(push)
#pragma warning(disable: 4003)
#endif
#include <boost/utility/result_of.hpp>
#if defined(BOOST_MSVC)
#pragma warning(pop)
#endif
#include <boost/version.hpp>
#endif // end C++<11
namespace CGAL {
namespace cpp11 {
#if CGAL_CXX20 || __cpp_lib_is_invocable>=201703L
template<typename Signature> class result_of;
template<typename F, typename... Args>
class result_of<F(Args...)> : public std::invoke_result<F, Args...> { };
#elif CGAL_CXX11
using std::result_of;
#else // C++<11
using boost::result_of;
#endif // end C++<11
} // end cpp11
} // end CGAL
#include <CGAL/enable_warnings.h>
#endif // CGAL_RESULT_OF_H

View File

@ -17,7 +17,6 @@
#include <CGAL/license/Spatial_searching.h> #include <CGAL/license/Spatial_searching.h>
#include <CGAL/result_of.h>
#include <CGAL/Kd_tree_rectangle.h> #include <CGAL/Kd_tree_rectangle.h>
#include <CGAL/internal/Get_dimension_tag.h> #include <CGAL/internal/Get_dimension_tag.h>
#include <vector> #include <vector>

View File

@ -38,7 +38,6 @@
#include <CGAL/Cartesian_converter.h> #include <CGAL/Cartesian_converter.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h> #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Kernel_traits.h> #include <CGAL/Kernel_traits.h>
#include <CGAL/result_of.h>
#ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO #ifndef CGAL_TRIANGULATION_3_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO
#include <CGAL/Spatial_sort_traits_adapter_3.h> #include <CGAL/Spatial_sort_traits_adapter_3.h>