|
Boost Users : |
From: Andrew Lin (lin_at_[hidden])
Date: 2005-12-20 20:24:39
Hello all,
This is my first message so please forgive me if I've got the wrong list
or a like blunder.
I have a project using the Boost Serialization library with a custom
archive. It works fine under Boost 1.32, but fails to compile under
1.33. A condensed test case:
///////////////////////
#include <iostream>
#include <boost/archive/detail/common_oarchive.hpp>
class TestOArchive:
public boost::archive::detail::common_oarchive<TestOArchive>
{
private:
friend class boost::archive::save_access;
public:
void save_binary(void *address, size_t count);
private:
void save(int i) {std::cout << "got an int: " << i << '\n';}
void save(const char* p) {std::cout << "got a char*: " << p <<
'\n';}
};
int main()
{
TestOArchive ar;
ar << 3;
return 0;
}
///////////////////////
The test case is lifted almost directly from the documentation; it
compiles and runs fine under 1.32 but does not compile under 1.33 (g++
3.4.4 on Linux). The first of several error messages:
/usr/local/include/boost-1_33/boost/archive/detail/interface_oarchive.hp
p: In member function `const
boost::archive::detail::basic_pointer_oserializer*
boost::archive::detail::interface_oarchive<Archive>::register_type(const
T*)':
/usr/local/include/boost-1_33/boost/archive/detail/interface_oarchive.hp
p:66: error: invalid use of undefined type `const struct
boost::archive::detail::basic_pointer_oserializer'
/usr/local/include/boost-1_33/boost/archive/detail/basic_oarchive.hpp:43
: error: forward declaration of `const struct
boost::archive::detail::basic_pointer_oserializer'
Any advice would be greatly appreciated.
Andrew
=============================================================================================
Email transmissions can not be guaranteed to be secure or error-free, as information
could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain
viruses. The sender therefore does not accept liability for any errors or omissions in
the contents of this message which arise as a result of email transmission. In addition,
the information contained in this email message is intended only for use of the
individual or entity named above. If the reader of this message is not the intended
recipient, or the employee or agent responsible to deliver it to the intended recipient,
you are hereby notified that any dissemination, distribution, or copying of this communication,
disclosure of the parties to it, or any action taken or omitted to be taken in reliance on it,
is strictly prohibited, and may be unlawful. If you are not the intended recipient please
delete this email message.
==============================================================================================
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