boostorg / serialization

Boost.org serialization module
http://boost.org/libs/serialization
120 stars 139 forks source link

Simplify no wstreambuf support. #282

Closed jzmaddock closed 1 year ago

jzmaddock commented 1 year ago

See https://github.com/boostorg/serialization/pull/224.

jzmaddock commented 1 year ago

@robertramey : Looks like the CI is stalled indefinitely waiting for a runner - that's because the ubuntu-18 image has been deprecated (for example) and available runners are stupidly scarce. Shall I update the images used as part of this PR? The catch is that older gcc versions will no longer be available. They are available with the drone CI runners that the cpp alliance provides for us though...

robertramey commented 1 year ago

Don’t worry about it. Boost I never really works for me anyway. I’ll except the PR, sync, my own machine, and run the tests locally. I’m sure this will be fine with a change this modest. Many thanks to you both for your help on these very Obscure issues. Robert Rameywww.rrsd.comOn Apr 30, 2023, at 1:15 AM, jzmaddock @.***> wrote: @robertramey : Looks like the CI is stalled indefinitely waiting for a runner - that's because the ubuntu-18 image has been deprecated (for example) and available runners are stupidly scarce. Shall I update the images used as part of this PR? The catch is that older gcc versions will no longer be available. They are available with the drone CI runners that the cpp alliance provides for us though...

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

robertramey commented 1 year ago

looking more carefully at the PR I find a number of statements similar to the following:

[ test-bsl-run_files test_helper_support : : : [ requires std_wstreambuf ] ]

OK. But when I look at the source for test_helper_support , I don't see any reference to wide streams or wchar or anything else related. Why is the "requires" statement required here specifically? How does one know whether it's going to be needed or not?

jzmaddock commented 1 year ago

@robertramey, I added the requirement to all of the tests which had linker errors when building the tests with -DBOOST_NO_STD_LOCALE. Basically anything which used the xml_archives anywhere.

ArielSilver commented 1 year ago

**solution of this, ### boost serialization can not be sc stoped in windows platform #283

**


`struct base {
virtual std::string get_name () {
return STRUCT_STR(base);
}
template
void serialize(Archive &ar, const int version) {
}
};

struct A : public base {
virtual std::string get_name () {
return STRUCT_STR(A);
}
template
void serialize(Archive &ar, const int version) {
ar & boost::serialization::base_object(*this);
}
};

struct B : public A {
B(int _e) {e = _e;}
B() {}
virtual std::string get_name () {
std::cout << e;
return STRUCT_STR(B);
}

template<class Archive>
void serialize(Archive &ar, const int version) {
    ar & boost::serialization::base_object<A>(*this);
    ar & e;
    ar & p;
}

int e;
ProcessStatus p = UNINITIALIZED;
};

void register_oa_class_type(boost::archive::text_oarchive& oa) {
oa.register_type();
oa.register_type();
oa.register_type();
}

void register_ia_class_type(boost::archive::text_iarchive& ia) {
ia.register_type();
ia.register_type();
ia.register_type();
}`