DU Results -

Source patches

du1examplepolicy.hpp

7,32d6
< /*
<  * policy class syntax slightly changed
<  * 
<  *  struct/class policyT
<  *  {
<  *      static auto create() {
<  *          // return default T
< *       }
<  * 
<  *      template< typename Parser>
<  *      static void make(Parser && p) { // either loader or dumper
<  *          // p.int_attribute(std::string name, lambda returning reference);
<  *          // p.int_attribute(std::string name, lambda getter, lambda setter);
<  *          // p.string_attribute(std::string name, lambda returning reference);
<  *          // p.template enum_attribute< enumpolicy>
<  *                 (std::string name, lambda returning reference);
<  *          // p.template struct_sequence_attribute<structpolicy>
<  *                 (std::string name, lambda returning reference);
<  * };
<  * 
<  * + no need to repeat namespace name
<  * + calling parser's method makes more sense to me than passing
<  *   it as an argument to some function (which would probably call it anyway)
<  * - need to write template keyword in case of enum or struct_sequence
<  */
< 
35,47c9,21
<     static auto create()
<     {
<         return testB::E{};
<     }
< 
<     static serialize::enumeration_list< testB::E> enumeration()
<     {
<         return{
<             { testB::E_X, "X" },
<             { testB::E_Y, "Y" },
<             { testB::E_Z, "Z" }
<         };
<     }
---
> 	static auto create()
> 	{
> 		return testB::E{};
> 	}
> 
> 	static serialize::enumeration_list< testB::E> enumeration()
> 	{
> 		return{
> 			{ testB::E_X, "X" },
> 			{ testB::E_Y, "Y" },
> 			{ testB::E_Z, "Z" }
> 		};
> 	}
52,60c26,34
<     static auto create() {
<         return testB{};
<     }
< 
<     template< typename X>
<     static void make(X && x) {
<         x.string_attribute("B1", [](auto && m) -> auto && { return m->attrB1; });
<         x.template enum_attribute< enumpolicyE>("B2", [](auto && m) -> auto && { return m->attrB2; });
<     }
---
> 	static auto create() {
> 		return testB{};
> 	}
> 
> 	template< typename X>
> 	static void make(X && x) {
> 		serialize::string_attribute(x, "B1", [](auto && m) -> auto && { return m->attrB1; });
> 		serialize::enum_attribute< enumpolicyE>(x, "B2", [](auto && m) -> auto && { return m->attrB2; });
> 	}
65,74c39,48
<     static auto create() {
<         return testA{ 0, "" };
<     }
< 
<     template< typename X>
<     static void make(X && x) {
<         x.int_attribute("A1", [](auto && m) { return m->get_A1(); }, [](auto && m, auto && v) { m->set_A1(v); });
<         x.string_attribute("A2", [](auto && m) -> auto && { return m->fA2(); });
<         x.template struct_sequence_attribute< structpolicyB>("A3", [](auto && m) -> auto && { return m->fA3(); });
<     }
---
> 	static auto create() {
> 		return testA{ 0, "" };
> 	}
> 
> 	template< typename X>
> 	static void make(X && x) {
> 		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

Linker error reports

Run output diffs