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);
|
||||
#ifdef CGAL_CXX11
|
||||
std::allocator_traits<Vertex_allocator>::construct(vertex_alloc,v, Vertex());
|
||||
std::allocator_traits<Vertex_allocator>::construct(vertex_alloc,v);
|
||||
#else
|
||||
vertex_alloc.construct(v, Vertex());
|
||||
#endif
|
||||
|
|
@ -1117,7 +1117,7 @@ public:
|
|||
{
|
||||
Face* f = face_alloc.allocate(1);
|
||||
#ifdef CGAL_CXX11
|
||||
std::allocator_traits<Face_allocator>::construct(face_alloc, f, Face());
|
||||
std::allocator_traits<Face_allocator>::construct(face_alloc, f);
|
||||
#else
|
||||
face_alloc.construct(f, Face());
|
||||
#endif
|
||||
|
|
@ -1130,7 +1130,7 @@ public:
|
|||
{
|
||||
Outer_ccb* oc = out_ccb_alloc.allocate(1);
|
||||
#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
|
||||
out_ccb_alloc.construct(oc, Outer_ccb());
|
||||
#endif
|
||||
|
|
@ -1143,7 +1143,7 @@ public:
|
|||
{
|
||||
Inner_ccb* ic = in_ccb_alloc.allocate(1);
|
||||
#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
|
||||
in_ccb_alloc.construct(ic, Inner_ccb());
|
||||
#endif
|
||||
|
|
@ -1156,7 +1156,7 @@ public:
|
|||
{
|
||||
Isolated_vertex* iv = iso_vert_alloc.allocate(1);
|
||||
#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
|
||||
iso_vert_alloc.construct(iv, Isolated_vertex());
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ protected:
|
|||
// creates a new pair of opposite border halfedges.
|
||||
Halfedge_pair* hpair = edge_allocator.allocate(1);
|
||||
#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
|
||||
edge_allocator.construct(hpair, Halfedge_pair( h, g));
|
||||
#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){
|
||||
#ifdef CGAL_CXX11
|
||||
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
|
||||
alloc.construct(table + i, chained_map_elem<T>());
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1052,7 +1052,7 @@ public:
|
|||
Vertex* get_vertex_node( const Vertex& ) {
|
||||
Vertex* p = vertex_allocator.allocate(1);
|
||||
#ifdef CGAL_CXX11
|
||||
std::allocator_traits<Vertex_alloc>::construct(vertex_allocator, p, Vertex());
|
||||
std::allocator_traits<Vertex_alloc>::construct(vertex_allocator, p);
|
||||
#else
|
||||
vertex_allocator.construct( p, Vertex());
|
||||
#endif
|
||||
|
|
@ -1071,7 +1071,7 @@ public:
|
|||
Halfedge* get_halfedge_node( const Halfedge&) {
|
||||
Halfedge* p = halfedge_allocator.allocate(1);
|
||||
#ifdef CGAL_CXX11
|
||||
std::allocator_traits<Halfedge_alloc>::construct(halfedge_allocator, p, Halfedge());
|
||||
std::allocator_traits<Halfedge_alloc>::construct(halfedge_allocator, p);
|
||||
#else
|
||||
halfedge_allocator.construct( p, Halfedge());
|
||||
#endif
|
||||
|
|
@ -1090,7 +1090,7 @@ public:
|
|||
Halffacet* get_halffacet_node( const Halffacet& ) {
|
||||
Halffacet* p = halffacet_allocator.allocate(1);
|
||||
#ifdef CGAL_CXX11
|
||||
std::allocator_traits<Halffacet_alloc>::construct(halffacet_allocator, p, Halffacet());
|
||||
std::allocator_traits<Halffacet_alloc>::construct(halffacet_allocator, p);
|
||||
#else
|
||||
halffacet_allocator.construct( p, Halffacet());
|
||||
#endif
|
||||
|
|
@ -1109,7 +1109,7 @@ public:
|
|||
Volume* get_volume_node( const Volume& ) {
|
||||
Volume* p = volume_allocator.allocate(1);
|
||||
#ifdef CGAL_CXX11
|
||||
std::allocator_traits<Volume_alloc>::construct(volume_allocator, p, Volume());
|
||||
std::allocator_traits<Volume_alloc>::construct(volume_allocator, p);
|
||||
#else
|
||||
volume_allocator.construct( p, Volume());
|
||||
#endif
|
||||
|
|
@ -1128,7 +1128,7 @@ public:
|
|||
SHalfedge* get_shalfedge_node( const SHalfedge& ) {
|
||||
SHalfedge* p = shalfedge_allocator.allocate(1);
|
||||
#ifdef CGAL_CXX11
|
||||
std::allocator_traits<SHalfedge_alloc>::construct(shalfedge_allocator, p, SHalfedge());
|
||||
std::allocator_traits<SHalfedge_alloc>::construct(shalfedge_allocator, p);
|
||||
#else
|
||||
shalfedge_allocator.construct( p, SHalfedge());
|
||||
#endif
|
||||
|
|
@ -1147,7 +1147,7 @@ public:
|
|||
SHalfloop* get_shalfloop_node( const SHalfloop& ) {
|
||||
SHalfloop* p = shalfloop_allocator.allocate(1);
|
||||
#ifdef CGAL_CXX11
|
||||
std::allocator_traits<SHalfloop_alloc>::construct(shalfloop_allocator, p, SHalfloop());
|
||||
std::allocator_traits<SHalfloop_alloc>::construct(shalfloop_allocator, p);
|
||||
#else
|
||||
shalfloop_allocator.construct( p, SHalfloop());
|
||||
#endif
|
||||
|
|
@ -1166,7 +1166,7 @@ public:
|
|||
SFace* get_sface_node( const SFace& ) {
|
||||
SFace* p = sface_allocator.allocate(1);
|
||||
#ifdef CGAL_CXX11
|
||||
std::allocator_traits<SFace_alloc>::construct(sface_allocator, p, SFace());
|
||||
std::allocator_traits<SFace_alloc>::construct(sface_allocator, p);
|
||||
#else
|
||||
sface_allocator.construct( p, SFace());
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ typename Union_find<T,A>::handle Union_find<T,A>::make_set(const T& x) {
|
|||
pointer tmp = m_first;
|
||||
m_first = alloc.allocate(1);
|
||||
#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
|
||||
alloc.construct( m_first, Union_find_struct(tmp,x));
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue