Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Re: Kd Tree problem: cannot access Orthogonal_k_neighbor_search::Tree as it is private?
Chronological Thread
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Re: Kd Tree problem: cannot access Orthogonal_k_neighbor_search::Tree as it is private?
- Date: Tue, 27 Mar 2012 08:20:02 +0200
On 03/27/2012 04:01 AM, freckles wrote:
Well, that's the weird thing. It's not reproducable in a minimal example as
it has worked before, it's just when a Kd_tree was added as a member object
in a *particular* class, it gave that compile error, which is why we don't
really know what to do about it.
However when the following code in Kd_tree.h was turned public, it managed
to compile. It seems like a cheap and strange way to get it to work and I'm
not sure we'll ever know why it's so.
i.e.
// protected copy constructor
public:
Kd_tree(const Tree& tree)
: built_(tree.built_)
{};
Thanks anyway. :)
The copy constructor is not public because it's not implemented for public use.
If you have a compilation error, it's because you are trying to copy a class containing a kd-tree (which is not possible). You should use something like a reference or a (shared) pointer to your tree instead
(if it makes sense for your application).
Sebastien
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Kd-Tree-problem-cannot-access-Orthogonal-k-neighbor-search-Tree-as-it-is-private-tp4505262p4507758.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Kd Tree problem: cannot access Orthogonal_k_neighbor_search::Tree as it is private?, freckles, 03/26/2012
- Re: [cgal-discuss] Kd Tree problem: cannot access Orthogonal_k_neighbor_search::Tree as it is private?, Philipp Moeller, 03/26/2012
- [cgal-discuss] Re: Kd Tree problem: cannot access Orthogonal_k_neighbor_search::Tree as it is private?, freckles, 03/27/2012
- Re: [cgal-discuss] Re: Kd Tree problem: cannot access Orthogonal_k_neighbor_search::Tree as it is private?, Sebastien Loriot (GeometryFactory), 03/27/2012
- Re: [cgal-discuss] Re: Kd Tree problem: cannot access Orthogonal_k_neighbor_search::Tree as it is private?, Philipp Moeller, 03/27/2012
- Re: [cgal-discuss] Re: Kd Tree problem: cannot access Orthogonal_k_neighbor_search::Tree as it is private?, Sebastien Loriot (GeometryFactory), 03/27/2012
- [cgal-discuss] Re: Kd Tree problem: cannot access Orthogonal_k_neighbor_search::Tree as it is private?, freckles, 03/27/2012
- Re: [cgal-discuss] Kd Tree problem: cannot access Orthogonal_k_neighbor_search::Tree as it is private?, Philipp Moeller, 03/26/2012
Archive powered by MHonArc 2.6.16.