Skip to content

voronoicell(_neighbor) is not copy-constructable #6

@tohain

Description

@tohain

The classes voronoicell and voronoicell_neighbor are not copy-constructable. Thus code, where such objects are returned bail out at compilation (g++-10) with the error:

In file included from /voro++.hh:322,
                 from main.cpp:1:
voro++/cell.hh: In instantiation of ‘voro::voronoicell::voronoicell(c_class&) [with c_class = voro::voronoicell]’:
main.cpp:13:31:   required from here
voro++/cell.hh:323:52: error: ‘class voro::voronoicell’ has no member named ‘max_len_sq’
  323 |   voronoicell(c_class &con) : voronoicell_base(con.max_len_sq) {}
      |                                                ~~~~^~~~~~~~~~

with the minimal example

#include "voro++.hh"

int main(){
  voro::container_periodic_poly con (1, 0,1,0,0,1, 8, 8, 8, 8);
  voro::voronoicell vc;
  voro::particle_order po;
  
  con.put( po, 0, 0.1, 0.1, 0.1, 1 );
  con.compute_cell(vc, po.o[0], po.op[0] );

  voro::voronoicell vc_c ( vc );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions