|
Boost Users : |
From: Tomá¹ ©alamon (tomas.salamon_at_[hidden])
Date: 2008-07-12 08:30:50
Hi,
I am a newbie to Boost libraries and I have the following problem with Boost
intrusive list:
I have a Page class and I need to put its instances into an intrusive set.
There is no problem and it is working fine. Beside that, I need every
instance of this class had a member intrusive list containing other Pages.
The source is as follows:
struct pageTag;
typedef link_mode<normal_link> NormalLinkMode;
typedef set_base_hook<tag<pageTag>, NormalLinkMode> SetPageHook;
typedef list_base_hook<tag<pageTag>, NormalLinkMode> ListPageHook;
class Page :
public ListPageHook,
public SetPageHook
{
public:
typedef set<Page, base_hook<SetPageHook>> PageSet;
typedef list<Page, base_hook<ListPageHook>> PageList;
Page();
...
friend bool operator< (const Page &a, const Page &b)
{ return a.fullPath < b.fullPath; }
friend bool operator> (const Page &a, const Page &b)
{ return a.fullPath > b.fullPath; }
friend bool operator== (const Page &a, const Page &b)
{ return a.fullPath < b.fullPath; }
private:
// some stuff here
PageList links; /****************** THIS IS THE PROBLEM
*************************
};
As I add the last line with the list, I get: "Error 1 error C2248:
'boost::intrusive::list_impl<Config>::list_impl' : cannot access private
member declared in class 'boost::intrusive::list_impl<Config>' c:\program
files\boost\boost_1_35_0\boost\intrusive\list.hpp 1434".
Is there any problem with recursion in Boost intrusive containers?
Thank you.
Tomas
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net