mirror of https://github.com/CGAL/cgal
Exploit that construct is variadic
This commit is contained in:
parent
1df9441888
commit
97ac4d5f51
|
|
@ -1090,7 +1090,7 @@ public:
|
||||||
{
|
{
|
||||||
Vertex* v = vertex_alloc.allocate(1);
|
Vertex* v = vertex_alloc.allocate(1);
|
||||||
#ifdef CGAL_CXX11
|
#ifdef CGAL_CXX11
|
||||||
std::allocator_traits<Vertex_allocator>::construct(vertex_alloc,v, Vertex());
|
std::allocator_traits<Vertex_allocator>::construct(vertex_alloc,v);
|
||||||
#else
|
#else
|
||||||
vertex_alloc.construct(v, Vertex());
|
vertex_alloc.construct(v, Vertex());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1117,7 +1117,7 @@ public:
|
||||||
{
|
{
|
||||||
Face* f = face_alloc.allocate(1);
|
Face* f = face_alloc.allocate(1);
|
||||||
#ifdef CGAL_CXX11
|
#ifdef CGAL_CXX11
|
||||||
std::allocator_traits<Face_allocator>::construct(face_alloc, f, Face());
|
std::allocator_traits<Face_allocator>::construct(face_alloc, f);
|
||||||
#else
|
#else
|
||||||
face_alloc.construct(f, Face());
|
face_alloc.construct(f, Face());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1130,7 +1130,7 @@ public:
|
||||||
{
|
{
|
||||||
Outer_ccb* oc = out_ccb_alloc.allocate(1);
|
Outer_ccb* oc = out_ccb_alloc.allocate(1);
|
||||||
#ifdef CGAL_CXX11
|
#ifdef CGAL_CXX11
|
||||||
std::allocator_traits<Outer_ccb_allocator>::construct(out_ccb_alloc, oc, Outer_ccb());
|
std::allocator_traits<Outer_ccb_allocator>::construct(out_ccb_alloc, oc);
|
||||||
#else
|
#else
|
||||||
out_ccb_alloc.construct(oc, Outer_ccb());
|
out_ccb_alloc.construct(oc, Outer_ccb());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1143,7 +1143,7 @@ public:
|
||||||
{
|
{
|
||||||
Inner_ccb* ic = in_ccb_alloc.allocate(1);
|
Inner_ccb* ic = in_ccb_alloc.allocate(1);
|
||||||
#ifdef CGAL_CXX11
|
#ifdef CGAL_CXX11
|
||||||
std::allocator_traits<Inner_ccb_allocator>::construct(in_ccb_alloc, ic, Inner_ccb());
|
std::allocator_traits<Inner_ccb_allocator>::construct(in_ccb_alloc, ic);
|
||||||
#else
|
#else
|
||||||
in_ccb_alloc.construct(ic, Inner_ccb());
|
in_ccb_alloc.construct(ic, Inner_ccb());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1156,7 +1156,7 @@ public:
|
||||||
{
|
{
|
||||||
Isolated_vertex* iv = iso_vert_alloc.allocate(1);
|
Isolated_vertex* iv = iso_vert_alloc.allocate(1);
|
||||||
#ifdef CGAL_CXX11
|
#ifdef CGAL_CXX11
|
||||||
std::allocator_traits<Iso_vert_allocator>::construct(iso_vert_alloc, iv, Isolated_vertex());
|
std::allocator_traits<Iso_vert_allocator>::construct(iso_vert_alloc, iv);
|
||||||
#else
|
#else
|
||||||
iso_vert_alloc.construct(iv, Isolated_vertex());
|
iso_vert_alloc.construct(iv, Isolated_vertex());
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -292,7 +292,7 @@ protected:
|
||||||
// creates a new pair of opposite border halfedges.
|
// creates a new pair of opposite border halfedges.
|
||||||
Halfedge_pair* hpair = edge_allocator.allocate(1);
|
Halfedge_pair* hpair = edge_allocator.allocate(1);
|
||||||
#ifdef CGAL_CXX11
|
#ifdef CGAL_CXX11
|
||||||
std::allocator_traits<Edge_allocator>::construct(edge_allocator, hpair, Halfedge_pair( h, g));
|
std::allocator_traits<Edge_allocator>::construct(edge_allocator, hpair, h, g);
|
||||||
#else
|
#else
|
||||||
edge_allocator.construct(hpair, Halfedge_pair( h, g));
|
edge_allocator.construct(hpair, Halfedge_pair( h, g));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ void chained_map<T, Allocator>::init_table(std::size_t t)
|
||||||
for (std::size_t i = 0 ; i < t + t/2 ; ++i){
|
for (std::size_t i = 0 ; i < t + t/2 ; ++i){
|
||||||
#ifdef CGAL_CXX11
|
#ifdef CGAL_CXX11
|
||||||
typedef std::allocator_traits<Allocator> Allocator_traits;
|
typedef std::allocator_traits<Allocator> Allocator_traits;
|
||||||
std::allocator_traits<allocator_type>::construct(alloc,table + i, chained_map_elem<T>());
|
std::allocator_traits<allocator_type>::construct(alloc,table + i);
|
||||||
#else
|
#else
|
||||||
alloc.construct(table + i, chained_map_elem<T>());
|
alloc.construct(table + i, chained_map_elem<T>());
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1052,7 +1052,7 @@ public:
|
||||||
Vertex* get_vertex_node( const Vertex& ) {
|
Vertex* get_vertex_node( const Vertex& ) {
|
||||||
Vertex* p = vertex_allocator.allocate(1);
|
Vertex* p = vertex_allocator.allocate(1);
|
||||||
#ifdef CGAL_CXX11
|
#ifdef CGAL_CXX11
|
||||||
std::allocator_traits<Vertex_alloc>::construct(vertex_allocator, p, Vertex());
|
std::allocator_traits<Vertex_alloc>::construct(vertex_allocator, p);
|
||||||
#else
|
#else
|
||||||
vertex_allocator.construct( p, Vertex());
|
vertex_allocator.construct( p, Vertex());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1071,7 +1071,7 @@ public:
|
||||||
Halfedge* get_halfedge_node( const Halfedge&) {
|
Halfedge* get_halfedge_node( const Halfedge&) {
|
||||||
Halfedge* p = halfedge_allocator.allocate(1);
|
Halfedge* p = halfedge_allocator.allocate(1);
|
||||||
#ifdef CGAL_CXX11
|
#ifdef CGAL_CXX11
|
||||||
std::allocator_traits<Halfedge_alloc>::construct(halfedge_allocator, p, Halfedge());
|
std::allocator_traits<Halfedge_alloc>::construct(halfedge_allocator, p);
|
||||||
#else
|
#else
|
||||||
halfedge_allocator.construct( p, Halfedge());
|
halfedge_allocator.construct( p, Halfedge());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1090,7 +1090,7 @@ public:
|
||||||
Halffacet* get_halffacet_node( const Halffacet& ) {
|
Halffacet* get_halffacet_node( const Halffacet& ) {
|
||||||
Halffacet* p = halffacet_allocator.allocate(1);
|
Halffacet* p = halffacet_allocator.allocate(1);
|
||||||
#ifdef CGAL_CXX11
|
#ifdef CGAL_CXX11
|
||||||
std::allocator_traits<Halffacet_alloc>::construct(halffacet_allocator, p, Halffacet());
|
std::allocator_traits<Halffacet_alloc>::construct(halffacet_allocator, p);
|
||||||
#else
|
#else
|
||||||
halffacet_allocator.construct( p, Halffacet());
|
halffacet_allocator.construct( p, Halffacet());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1109,7 +1109,7 @@ public:
|
||||||
Volume* get_volume_node( const Volume& ) {
|
Volume* get_volume_node( const Volume& ) {
|
||||||
Volume* p = volume_allocator.allocate(1);
|
Volume* p = volume_allocator.allocate(1);
|
||||||
#ifdef CGAL_CXX11
|
#ifdef CGAL_CXX11
|
||||||
std::allocator_traits<Volume_alloc>::construct(volume_allocator, p, Volume());
|
std::allocator_traits<Volume_alloc>::construct(volume_allocator, p);
|
||||||
#else
|
#else
|
||||||
volume_allocator.construct( p, Volume());
|
volume_allocator.construct( p, Volume());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1128,7 +1128,7 @@ public:
|
||||||
SHalfedge* get_shalfedge_node( const SHalfedge& ) {
|
SHalfedge* get_shalfedge_node( const SHalfedge& ) {
|
||||||
SHalfedge* p = shalfedge_allocator.allocate(1);
|
SHalfedge* p = shalfedge_allocator.allocate(1);
|
||||||
#ifdef CGAL_CXX11
|
#ifdef CGAL_CXX11
|
||||||
std::allocator_traits<SHalfedge_alloc>::construct(shalfedge_allocator, p, SHalfedge());
|
std::allocator_traits<SHalfedge_alloc>::construct(shalfedge_allocator, p);
|
||||||
#else
|
#else
|
||||||
shalfedge_allocator.construct( p, SHalfedge());
|
shalfedge_allocator.construct( p, SHalfedge());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1147,7 +1147,7 @@ public:
|
||||||
SHalfloop* get_shalfloop_node( const SHalfloop& ) {
|
SHalfloop* get_shalfloop_node( const SHalfloop& ) {
|
||||||
SHalfloop* p = shalfloop_allocator.allocate(1);
|
SHalfloop* p = shalfloop_allocator.allocate(1);
|
||||||
#ifdef CGAL_CXX11
|
#ifdef CGAL_CXX11
|
||||||
std::allocator_traits<SHalfloop_alloc>::construct(shalfloop_allocator, p, SHalfloop());
|
std::allocator_traits<SHalfloop_alloc>::construct(shalfloop_allocator, p);
|
||||||
#else
|
#else
|
||||||
shalfloop_allocator.construct( p, SHalfloop());
|
shalfloop_allocator.construct( p, SHalfloop());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1166,7 +1166,7 @@ public:
|
||||||
SFace* get_sface_node( const SFace& ) {
|
SFace* get_sface_node( const SFace& ) {
|
||||||
SFace* p = sface_allocator.allocate(1);
|
SFace* p = sface_allocator.allocate(1);
|
||||||
#ifdef CGAL_CXX11
|
#ifdef CGAL_CXX11
|
||||||
std::allocator_traits<SFace_alloc>::construct(sface_allocator, p, SFace());
|
std::allocator_traits<SFace_alloc>::construct(sface_allocator, p);
|
||||||
#else
|
#else
|
||||||
sface_allocator.construct( p, SFace());
|
sface_allocator.construct( p, SFace());
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -223,7 +223,7 @@ typename Union_find<T,A>::handle Union_find<T,A>::make_set(const T& x) {
|
||||||
pointer tmp = m_first;
|
pointer tmp = m_first;
|
||||||
m_first = alloc.allocate(1);
|
m_first = alloc.allocate(1);
|
||||||
#ifdef CGAL_CXX11
|
#ifdef CGAL_CXX11
|
||||||
std::allocator_traits<allocator>::construct(alloc, m_first, Union_find_struct(tmp,x));
|
std::allocator_traits<allocator>::construct(alloc, m_first, tmp, x);
|
||||||
#else
|
#else
|
||||||
alloc.construct( m_first, Union_find_struct(tmp,x));
|
alloc.construct( m_first, Union_find_struct(tmp,x));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue