DU Results -

Source patches

du1examplepolicy.hpp

17c17
< 			{ testB::E_X, "Xsdvsd sd \"" },
---
> 			{ testB::E_X, "X" },
32,34c32,33
< 		serialize::attribute(x, "B1",
<             [](auto && m) -> auto && { return m->attrB1; });
<         serialize::attribute< enumpolicyE>(x, "B2", &testB::attrB2);
---
> 		serialize::string_attribute(x, "B1", [](auto && m) -> auto && { return m->attrB1; });
> 		serialize::enum_attribute< enumpolicyE>(x, "B2", [](auto && m) -> auto && { return m->attrB2; });
46,62c45,47
<         serialize::attribute(x, "A1", &testA::get_A1, &testA::set_A1);
<         serialize::attribute(x, "A1", &testA::get_A1, [](auto m,auto v){m->set_A1(v);});
<         serialize::attribute(x, "A1", [](auto m){return m->get_A1();}, &testA::set_A1);
<         serialize::attribute(x, "A1", [](auto m){return (long double)m->get_A1()/8;}, [](auto m,auto v){m->set_A1(v*8);});
<         serialize::attribute(x, "A2", [](auto m)->auto&&{ return m->fA2(); }, [](auto m, auto && v) { m->fA2() = v; });
<         serialize::attribute(x, "A2", &testA::fA2);
<         serialize::attribute< serialize::sequence<structpolicyB>>(x, "A3", [](auto m) ->auto&& { return m->fA3(); });
<         /*
<         - getters and setters are supposed to be used for coping, but work with 'auto&&' references too.
<         - to prevent '-> auto &&' errors we prefer to use member pointers
<             - however program cannot be compiled with these errors (but without nice report.
<         
<         serialize::attribute< sequence<>> (&testA::vi_ref)
<         - works with both reference to mamber object and function function
<         - vi_ref is whatever we can push_back (primintive_policy) types
<         
<         */
---
> 		serialize::int_attribute(x, "A1", [](auto && m) { return m->get_A1(); }, [](auto && m, auto && v) { m->set_A1(v); });
> 		serialize::string_attribute(x, "A2", [](auto && m) -> auto && { return m->fA2(); });
> 		serialize::struct_sequence_attribute< structpolicyB>(x, "A3", [](auto && m) -> auto && { return m->fA3(); });

Flex error reports

C++ error reports

du1test.cpp

D:\Users\bednarek\@SVN\NPRG051\studenti\20162\Cerny_Marek_93573639\du1examplepolicy.hpp(49): warning C4244: 'argument': conversion from 'long double' to 'int', possible loss of data
d:\users\bednarek\@svn\nprg051\studenti\20162\cerny_marek_93573639\du1serialize.hpp(255): note: see reference to function template instantiation 'auto structpolicyA::make::<lambda_8ee4b86367043cf3644d7b7b2946a0f7>::operator ()<Obj*,T>(Obj *,T) const' being compiled
        with
        [
            Obj=testA,
            T=long double
        ]
D:\Users\bednarek\@SVN\NPRG051\studenti\20162\Cerny_Marek_93573639\du1examplepolicy.hpp(49): note: see reference to function template instantiation 'void serialize::attribute<serialize::primitive_policy,testA,structpolicyA::make::<lambda_fd8de5f1a70de90e503cb64447081d2e>,structpolicyA::make::<lambda_8ee4b86367043cf3644d7b7b2946a0f7>>(serialize::loader<testA> &,const std::string &,Getter,Setter)' being compiled
        with
        [
            Getter=structpolicyA::make::<lambda_fd8de5f1a70de90e503cb64447081d2e>,
            Setter=structpolicyA::make::<lambda_8ee4b86367043cf3644d7b7b2946a0f7>
        ]
d:\users\bednarek\@svn\nprg051\studenti\20162\cerny_marek_93573639\du1serialize.hpp(220): note: see reference to function template instantiation 'void structpolicyA::make<serialize::loader<testA>>(X &&)' being compiled
        with
        [
            X=serialize::loader<testA>
        ]
du1test.cpp(48): note: see reference to function template instantiation 'testA serialize::load<structpolicyA>(std::istream &)' being compiled

Linker error reports

Run output diffs

empty

1c1
< {"A1":100, "A1":100, "A1":100, "A1":12.5, "A2":"Hello", "A2":"Hello", "A3":[{"B1":"One", "B2":"Xsdvsd sd \""}, {"B1":"Two", "B2":"Y"}, {"B1":"Three", "B2":"Z"}]}
---
> {"A1":100,"A2":"Hello","A3":[{"B1":"One","B2":"X"},{"B1":"Two","B2":"Y"},{"B1":"Three","B2":"Z"}]}
\ No newline at end of file