mirror of https://github.com/CGAL/cgal
parent
04978d8aae
commit
3a32f3f3ef
|
|
@ -615,6 +615,45 @@ using std::max;
|
||||||
# define CGAL_PRAGMA_DIAG_POP
|
# define CGAL_PRAGMA_DIAG_POP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//
|
||||||
|
// Compatibility with CGAL-4.14.
|
||||||
|
//
|
||||||
|
// That is temporary, and will be replaced by a namespace alias, as
|
||||||
|
// soon as we can remove cpp11::result_of, and <CGAL/atomic.h> and
|
||||||
|
// <CGAL/thread.h>.
|
||||||
|
//
|
||||||
|
# include <iterator>
|
||||||
|
# include <array>
|
||||||
|
# include <utility>
|
||||||
|
# include <type_traits>
|
||||||
|
# include <unordered_set>
|
||||||
|
# include <unordered_map>
|
||||||
|
# include <functional>
|
||||||
|
//
|
||||||
|
namespace CGAL {
|
||||||
|
//
|
||||||
|
namespace cpp11 {
|
||||||
|
using std::next;
|
||||||
|
using std::prev;
|
||||||
|
using std::copy_n;
|
||||||
|
using std::array;
|
||||||
|
using std::function;
|
||||||
|
using std::tuple;
|
||||||
|
using std::make_tuple;
|
||||||
|
using std::tie;
|
||||||
|
using std::get;
|
||||||
|
using std::tuple_size;
|
||||||
|
using std::tuple_element;
|
||||||
|
using std::is_enum;
|
||||||
|
using std::unordered_set;
|
||||||
|
using std::unordered_map;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
namespace cpp0x = cpp11;
|
||||||
|
using cpp11::array;
|
||||||
|
using cpp11::copy_n;
|
||||||
|
} // end of the temporary compatibility with CGAL-4.14
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
// Typedef for the type of NULL.
|
// Typedef for the type of NULL.
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ if ( CGAL_FOUND )
|
||||||
create_single_source_cgal_program( "test_Modifiable_priority_queue.cpp" )
|
create_single_source_cgal_program( "test_Modifiable_priority_queue.cpp" )
|
||||||
create_single_source_cgal_program( "test_multiset.cpp" )
|
create_single_source_cgal_program( "test_multiset.cpp" )
|
||||||
create_single_source_cgal_program( "test_N_tuple.cpp" )
|
create_single_source_cgal_program( "test_N_tuple.cpp" )
|
||||||
|
create_single_source_cgal_program( "test_namespaces.cpp" )
|
||||||
create_single_source_cgal_program( "test_Nested_iterator.cpp" )
|
create_single_source_cgal_program( "test_Nested_iterator.cpp" )
|
||||||
create_single_source_cgal_program( "test_Object.cpp" )
|
create_single_source_cgal_program( "test_Object.cpp" )
|
||||||
create_single_source_cgal_program( "test_stl_extension.cpp" )
|
create_single_source_cgal_program( "test_stl_extension.cpp" )
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
#include <CGAL/internal/disable_deprecation_warnings_and_errors.h> // because CGAL::copy_n is deprecated
|
||||||
|
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
|
#if defined(BOOST_MSVC)
|
||||||
|
// avoid: warning C4996: 'CGAL::copy_n': was declared deprecated
|
||||||
|
# pragma warning(disable:4996)
|
||||||
|
#endif
|
||||||
|
#include <CGAL/array.h>
|
||||||
|
#include <CGAL/tuple.h>
|
||||||
|
#include <CGAL/algorithm.h>
|
||||||
|
#include <CGAL/use.h>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
CGAL::cpp0x::array<int, 3> arr;
|
||||||
|
std::array<int, 3> arr2;
|
||||||
|
|
||||||
|
CGAL::cpp0x::tuple<double, int> tuple;
|
||||||
|
std::tuple<double, int> tuple2;
|
||||||
|
|
||||||
|
CGAL_USE(tuple);
|
||||||
|
CGAL_USE(tuple2);
|
||||||
|
|
||||||
|
CGAL::copy_n(arr.begin(), 3, arr2.begin());
|
||||||
|
|
||||||
|
CGAL::cpp0x::copy_n(arr.begin(), 3, arr2.begin());
|
||||||
|
std::copy_n(arr.begin(), 3, arr2.begin());
|
||||||
|
|
||||||
|
CGAL::cpp0x::prev(arr.end());
|
||||||
|
std::prev(arr.end());
|
||||||
|
CGAL::cpp0x::next(arr.begin());
|
||||||
|
std::next(arr.begin());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue