Class

CGAL::cpp11::array<T, int>

Definition

An object of the class cpp11::array<T, int> represents an array of elements of type T, the number of which is specified by the second template argument.

There is actually no class in namespace CGAL::cpp11 with this name, but a using declaration which imports a class from another namespace. By order of priority: the one in namespace std is used (provided by C++0x), if not found, then the one in namespace std::tr1 is used (provided by TR1), and finally, the fallback solution is taken from Boost.

#include <CGAL/array.h>

Parameters

The parameter T is the value type. The second parameter is the dimension of the array.

Construction functions

The array class does not provide a constructor which can be used to initialize data members. Cgal therefore provides a make_array function for this purpose, up to a certain number of arguments.

template <class T>
array<T, 1> make_array ( T a) returns an array of dimension 1 whose first element is a.

template <class T>
array<T, 2> make_array ( T a1, T a2) returns an array of dimension 2 whose first element is a1 and second element is a2.