Merge pull request #5671 from maxGimeno/CGAL_IO-Add_missing-deprecated_functions-maxGimeno

CGAL_IO: Add missing fallbacks

# Conflicts:
#	BGL/include/CGAL/boost/graph/IO/INP.h
#	Point_set_processing_3/include/CGAL/IO/write_xyz_points.h
This commit is contained in:
Laurent Rineau 2021-05-18 18:13:38 +02:00
commit d6b2c8d9dc
11 changed files with 43 additions and 7 deletions

View File

@ -98,6 +98,25 @@ bool write_INP(const std::string& fname, const std::string& type, const Graph& g
return write_INP(fname, type, g, parameters::all_default()); return write_INP(fname, type, g, parameters::all_default());
} }
#ifndef CGAL_NO_DEPRECATED_CODE
template <typename FaceGraph, typename NamedParameters>
CGAL_DEPRECATED bool write_inp(std::ostream& os,
const FaceGraph& g,
std::string name,
std::string type,
const NamedParameters& np)
{
return write_INP(os, name, type, g, np);
}
template <typename FaceGraph>
CGAL_DEPRECATED bool write_inp(std::ostream& os,
const FaceGraph& g,
std::string name,
std::string type)
{
return write_INP(os, name, type, g, parameters::all_default());
}
#endif
/// \endcond /// \endcond
}} // namespace CGAL::IO }} // namespace CGAL::IO

View File

@ -313,6 +313,12 @@ CGAL_DEPRECATED bool read_off(const char* fname, Graph& g)
return read_off(fname, g, parameters::all_default()); return read_off(fname, g, parameters::all_default());
} }
template <typename Graph>
CGAL_DEPRECATED bool read_off(const std::string& fname, Graph& g)
{
return read_off(fname.c_str(), g, parameters::all_default());
}
#endif // CGAL_NO_DEPRECATED_CODE #endif // CGAL_NO_DEPRECATED_CODE
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////

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

@ -652,7 +652,15 @@ namespace CGAL {
// Typedef for the type of nullptr. // Typedef for the type of nullptr.
typedef const void * Nullptr_t; // Anticipate C++0x's std::nullptr_t typedef const void * Nullptr_t; // Anticipate C++0x's std::nullptr_t
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...> { };
#else
using std::result_of;
#endif
}//namespace cpp11
} //namespace CGAL } //namespace CGAL
//Support for c++11 noexcept //Support for c++11 noexcept

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

@ -328,7 +328,7 @@ CGAL_DEPRECATED bool write_xyz_points(std::ostream& os, const PointRange& points
template <typename PointRange> template <typename PointRange>
CGAL_DEPRECATED bool write_xyz_points(std::ostream& os, const PointRange& points) CGAL_DEPRECATED bool write_xyz_points(std::ostream& os, const PointRange& points)
{ {
return IO::write_XYZ(os, points, parameters::all_default(points)); return IO::write_XYZ(os, points, parameters::all_default());
} }
/// \endcond /// \endcond

View File

@ -18,6 +18,9 @@
#ifndef CGAL_RESULT_OF_H #ifndef CGAL_RESULT_OF_H
#define CGAL_RESULT_OF_H #define CGAL_RESULT_OF_H
#define CGAL_DEPRECATED_HEADER "<CGAL/result_of.h>"
#define CGAL_REPLACEMENT_HEADER "<CGAL/config.h>"
#include <CGAL/config.h> #include <CGAL/config.h>
#include <CGAL/disable_warnings.h> #include <CGAL/disable_warnings.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

@ -1145,6 +1145,11 @@ CGAL_DEPRECATED bool write_ply(std::ostream& os, const Surface_mesh<P>& sm, cons
return IO::write_PLY(os, sm, comments); return IO::write_PLY(os, sm, comments);
} }
template <typename P>
CGAL_DEPRECATED bool write_ply(std::ostream& os, const Surface_mesh<P>& sm)
{
return write_PLY(os, sm, "");
}
#endif // CGAL_NO_DEPRECATED_CODE #endif // CGAL_NO_DEPRECATED_CODE
} // namespace CGAL } // namespace CGAL

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>