DU Results -

Source patches

du1serialize.hpp

101,103c101,103
<         std::vector< char> buffer(name.length() + 1); // +1 for \0
<         ifs.get(buffer.data(), name.length() + 1);
<         if (name.compare(buffer.data()) != 0) // are not equal
---
>         char buffer[name.length() + 1]; // +1 for \0
>         ifs.get(buffer, name.length() + 1);
>         if (name.compare(buffer) != 0) // are not equal

du1examplepolicy.hpp

16c16
<         return {
---
> 		return{
26d25
<     // returns of testB = instance of class i want to describe
31d29
<     // function to access attributes
45,46c43
<     // to access class attributes, X = dump_pair or load_pair
<     template< typename X>
---
> 	template< typename X>
48,50c45
<         // getters and setters for attributes
<         // m = instance reference, v = value to set
<         serialize::int_attribute(x, "A1", [](auto && m) { return m->get_A1(); }, [](auto && m, auto && v) { m->set_A1(v); });
---
> 		serialize::int_attribute(x, "A1", [](auto && m) { return m->get_A1(); }, [](auto && m, auto && v) { m->set_A1(v); });
52c47
<         serialize::struct_sequence_attribute< structpolicyB>(x, "A3", [](auto && m) -> auto && { return m->fA3(); });
---
> 		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\palasek_jan_63114551\du1serialize.hpp(136): warning C4244: 'return': conversion from '__int64' to 'int', possible loss of data
d:\users\bednarek\@svn\nprg051\studenti\20162\palasek_jan_63114551\du1serialize.hpp(113): note: while compiling class template member function 'int serialize::JSONLoader<testA>::LoadIntAttribute(const std::string &)'
d:\users\bednarek\@svn\nprg051\studenti\20162\palasek_jan_63114551\du1serialize.hpp(285): note: see reference to function template instantiation 'int serialize::JSONLoader<testA>::LoadIntAttribute(const std::string &)' being compiled
d:\users\bednarek\@svn\nprg051\studenti\20162\palasek_jan_63114551\du1serialize.hpp(245): note: see reference to class template instantiation 'serialize::JSONLoader<testA>' being compiled
du1test.cpp(48): note: see reference to function template instantiation 'testA serialize::load<structpolicyA>(std::istream &)' being compiled

Linker error reports

Run output diffs