[serialization] 1.33 RC1 vc1.7 serializing containers - include order
The following code produces error saying that archive is included after
serialization. What is the correct place to include map.hpp and other
predefined implementations when making a class with container members
serializable ?
a.h
-----
#include
There should be no need to include the first header in user code. In spite of its name, its really and implementation file. perhaps later well move it to a better place. Robert Ramey Zrubavel Zodikovich wrote:
The following code produces error saying that archive is included after serialization. What is the correct place to include map.hpp and other predefined implementations when making a class with container members serializable ?
a.h ----- #include
#include class A { public:
template<class Archive> void serialize(Archive & ar, const unsigned int version) { ar & someMap; }
std::map
someMap; }; ----- Thanks
The following still fails to compile:
-----
#include
There should be no need to include the first header in user code. In spite of its name, its really and implementation file. perhaps later well move it to a better place.
Robert Ramey
Zrubavel Zodikovich wrote:
The following code produces error saying that archive is included after serialization. What is the correct place to include map.hpp and other predefined implementations when making a class with container members serializable ?
a.h ----- #include
#include class A { public:
template<class Archive> void serialize(Archive & ar, const unsigned int version) { ar & someMap; }
std::map
someMap; }; ----- Thanks
Fixed by updating to latest CVS, please ignore. Thanks Zrubavel Zodikovich wrote:
The following still fails to compile: ----- #include
----- With these error messages:
v:\Src\Lib\boost\serialization\tracking.hpp(50) : error C2065: 'is_pointer' : undeclared identifier v:\Src\Lib\boost\serialization\tracking.hpp(66) : see reference to class template instantiation 'boost::serialization::tracking_level<T>' being compiled v:\Src\Lib\boost\serialization\tracking.hpp(50) : error C2974: 'boost::mpl::eval_if' : invalid template argument for 'C', type expected v:\Src\Lib\boost\mpl\eval_if.hpp(44) : see declaration of 'boost::mpl::eval_if' v:\Src\Lib\boost\serialization\tracking.hpp(64) : error C2977: 'boost::mpl::eval_if' : too many template arguments v:\Src\Lib\boost\mpl\eval_if.hpp(44) : see declaration of 'boost::mpl::eval_if' v:\Src\Lib\boost\serialization\tracking.hpp(64) : error C2059: syntax error : '>' v:\Src\Lib\boost\serialization\tracking.hpp(64) : error C2039: 'type' : is not a member of 'operator``global namespace''' v:\Src\Lib\boost\serialization\tracking.hpp(64) : error C2238: unexpected token(s) preceding ';' v:\Src\Lib\boost\archive\basic_archive.hpp(21) : fatal error C1189: #error : "no serialization headers my precede any archive headers"
Another include file that fails to compile:
-----
#include
There should be no need to include the first header in user code. In spite of its name, its really and implementation file. perhaps later well move it to a better place.
Robert Ramey
Zrubavel Zodikovich wrote:
The following code produces error saying that archive is included after serialization. What is the correct place to include map.hpp and other predefined implementations when making a class with container members serializable ?
a.h ----- #include
#include class A { public:
template<class Archive> void serialize(Archive & ar, const unsigned int version) { ar & someMap; }
std::map
someMap; }; ----- Thanks
Good call. Doug, I would like to check in the fix for this into RC_1_33_0 . I'm testing on my own setup here. Unfortunately, I don't have CW here and there is a tiny chance that there could be some surprise if I check it in. May I do this? Robert Ramey Zrubavel Zodikovich wrote:
Another include file that fails to compile:
----- #include
-----
On Aug 7, 2005, at 11:56 AM, Robert Ramey wrote:
Good call.
Doug, I would like to check in the fix for this into RC_1_33_0 . I'm testing on my own setup here. Unfortunately, I don't have CW here and there is a tiny chance that there could be some surprise if I check it in. May I do this?
Is it critical? I've just rolled RC2, and we'll have to push that back to Monday afternoon to accommodate this fix. Doug
Its not that critical. I would only want to do it if things were delayed anyway. So I won't check it in. Robert Ramey Douglas Gregor wrote:
On Aug 7, 2005, at 11:56 AM, Robert Ramey wrote:
Good call.
Doug, I would like to check in the fix for this into RC_1_33_0 . I'm testing on my own setup here. Unfortunately, I don't have CW here and there is a tiny chance that there could be some surprise if I check it in. May I do this?
Is it critical? I've just rolled RC2, and we'll have to push that back to Monday afternoon to accommodate this fix.
Doug
One thing I would like to do is to add information regarding the upgrades to the serialization library. I added these to the main development page many months ago but it seemed it got lost en route to the new page. Robert Ramey
On Aug 7, 2005, at 12:30 PM, Robert Ramey wrote:
One thing I would like to do is to add information regarding the upgrades to the serialization library. I added these to the main development page many months ago but it seemed it got lost en route to the new page.
You haven't fixed this yet? Please do so ASAP and e-mail me once it's in so I can rebuild the RC2 tarballs. Doug
OK - I've checked in an updated main page which notes the new features of the serialization package for this release. I don't know if its soon enough - oh well. Robert Ramey Douglas Gregor wrote:
On Aug 7, 2005, at 12:30 PM, Robert Ramey wrote:
One thing I would like to do is to add information regarding the upgrades to the serialization library. I added these to the main development page many months ago but it seemed it got lost en route to the new page.
You haven't fixed this yet? Please do so ASAP and e-mail me once it's in so I can rebuild the RC2 tarballs.
Doug
Fixed this locally, while waiting for official fix to make it through. Next problem: what's likely reason for assert(new_cid == cid) to be triggered in basic_iarchive.cpp line 444 ? Robert Ramey wrote:
Good call.
Doug, I would like to check in the fix for this into RC_1_33_0 . I'm testing on my own setup here. Unfortunately, I don't have CW here and there is a tiny chance that there could be some surprise if I check it in. May I do this?
Robert Ramey
Zrubavel Zodikovich wrote:
Another include file that fails to compile:
----- #include
-----
participants (3)
-
Douglas Gregor
-
Robert Ramey
-
Zrubavel Zodikovich