Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Kd_tree move constructible

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Kd_tree move constructible


Chronological Thread 
  • From: Bart Vermeulen <>
  • To: <>
  • Subject: Re: [cgal-discuss] Kd_tree move constructible
  • Date: Wed, 25 Nov 2015 17:54:40 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=Pass
  • Ironport-phdr: 9a23:qVVyhB/RFlcwsf9uRHKM819IXTAuvvDOBiVQ1KB91+8cTK2v8tzYMVDF4r011RmSDdidtKIP2raempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIsYL+lR8iN34/mi6ibwN76XUZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwu3cYh/V0o8VPWKG/c6UjRqFDFxwnNXo07Yvlr0+QYxGI4y42W38K2iRFGQ3I8RX3WN+luCLgqqxj1TOfMNDyQLYcRim4qaFvHky7wBwbPiI0pTmEwvd7i7hW9Uqs
  • Organization: Wageningen University
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:23

I solved the issue passing a pointer to the tree, instead of a reference.

Still I think it's strange that the copy construction is made private in Kd_tree.

Regards,
Bart Vermeulen

On 11/25/2015 05:34 PM, Bart Vermeulen wrote:
Hi All,

I'm trying to use c++11 threads with a Kd_tree.

I have a function which takes a Kd_Tree as input:

void foo (Tree const & tree, ...) {
// Do something
}

Than I try to pass the function to a std::thread construction:

std::thread thethread(foo, tree, ...);

This gives me an error telling me that the constructor Kd_tree(const Tree& tree) is private.

The std::thread construction requires all parameters to be move constructible, but why is this construction private for a Kd_tree?

Is there some way around this issue?

Regards,
Bart Vermeulen



--
Bart Vermeulen
Wageningen University, Department of Environmental Sciences
Hydrology and Quantitative Water Management Group
Postal address: Postbus 47, 6700AA Wageningen,The Netherlands
Visiting address: Room 0.C027, Droevendaalsesteeg 3,6708PB Wageningen, The
Netherlands
Tel. +31-317-482765 Fax +31-317-419000
email:





Archive powered by MHonArc 2.6.18.

Top of Page