correct access

[SVN r25630]
This commit is contained in:
Robert Ramey
2004-10-09 01:26:13 +00:00
parent 6a6014e107
commit dcb7fe4660
8 changed files with 24 additions and 4 deletions

View File

@@ -36,6 +36,10 @@ public:
friend class basic_binary_iarchive<Archive>;
friend class load_access;
#endif
// return a pointer to the most derived class
Archive * This(){
return static_cast<Archive *>(this);
}
// note: the following should not needed - but one compiler (vc 7.1)
// fails to compile one test (test_shared_ptr) without it !!!
template<class T>

View File

@@ -31,10 +31,14 @@ class binary_wiarchive_impl :
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
public:
#else
friend class detail::interface_iarchive<Archive>;
friend class basic_binary_iarchive<Archive>;
friend class basic_binary_iprimitive<Archive, std::wistream>;
friend class load_access;
#endif
// return a pointer to the most derived class
Archive * This(){
return static_cast<Archive *>(this);
}
// note: the following should not needed - but one compiler (vc 7.1)
// fails to compile one test (test_shared_ptr) without it !!!
template<class T>

View File

@@ -31,8 +31,8 @@ class binary_woarchive_impl :
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
public:
#else
friend class detail::interface_oarchive<Archive>;
friend class basic_binary_oarchive<Archive>;
friend class basic_binary_oprimitive<Archive, std::wostream>;
friend class save_access;
protected:
#endif

View File

@@ -50,6 +50,10 @@ public:
#ifndef BOOST_NO_STD_WSTRING
void load(std::wstring &ws);
#endif
// return a pointer to the most derived class
Archive * This(){
return static_cast<Archive *>(this);
}
// note: the following should not needed - but one compiler (vc 7.1)
// fails to compile one test (test_shared_ptr) without it !!!
template<class T>

View File

@@ -41,7 +41,7 @@ protected:
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
public:
#else
// friend class detail::interface_oarchive<Archive>;
friend class detail::interface_oarchive<Archive>;
friend class basic_text_oarchive<Archive>;
friend class save_access;
#endif

View File

@@ -41,6 +41,7 @@ protected:
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
public:
#else
friend class detail::interface_oarchive<Archive>;
friend class basic_text_oarchive<Archive>;
friend class save_access;
#endif

View File

@@ -65,6 +65,10 @@ public:
#ifndef BOOST_NO_STD_WSTRING
void load(std::wstring &ws);
#endif
// return a pointer to the most derived class
Archive * This(){
return static_cast<Archive *>(this);
}
template<class T>
void load_override(T & t, BOOST_PFTO int){
basic_xml_iarchive<Archive>::load_override(t, 0);

View File

@@ -65,7 +65,10 @@ public:
#ifndef BOOST_NO_STD_WSTRING
void load(std::wstring &ws);
#endif
// return a pointer to the most derived class
Archive * This(){
return static_cast<Archive *>(this);
}
template<class T>
void load_override(T & t, BOOST_PFTO int){
basic_xml_iarchive<Archive>::load_override(t, 0);