sub-contextes -> format depends on tuple-size (poor API)
๐๐กDesign
API:
csl::ag::concepts::aggregate auto value = /* some aggregate value */;
// 1: express intent: parse is "how", join is "what"
fmt::println("{indented}", csl::ag::io::join(value));
fmt::println("{indexed,indented}", csl::ag::io::join(value));
fmt::println("{indexed,typenamed,indented}", csl::ag::io::join(value));
fmt::println("{indexed,typenamed,compact}", csl::ag::io::join(value));
// 2: vs. join is "how" + "what"
fmt::println("{}", csl::ag::io::join<opt_ins...>(value));
fmt::println("{:n}", csl::ag::io::join<opt_ins...>(value)); // none
fmt::println("{:c}", csl::ag::io::join<opt_ins...>(value)); // compact => clash with indented
// 3: vs. same as 2, with opt-in presentation/style
csl::ag::io::join<opt_ins...>(value, presentation);
// 4: vs. "how" + "what" as view composition
fmt::println("{}", csl::ag::io::join<presentation::indented>(value));
fmt::println("{}", value | join<presentation::indented>);
fmt::println("{}", value | indexed | typenamed | join<presentation>);
Call: split formatting style and join_view, see #262 , #263
Dependencies
Pocs
135
iostream
,fmt
(in a similar way toensure
)fmt::formatter
: use range/tuple (depends on #131 )๐๐กDesign
API:
Call: split formatting style and join_view, see #262 , #263
none
compact
indented
๐๐ก Back to design:
๐๐กBack to design (2):
definition with same mangled name
see the version here withcsl::ag
instead ofstd::tuple
sImplementation design:
Recursive lambda quick impl:
๐ก Ideas
๐ก views composition
join_view<strategies...>
see #262
๐ก Idea : flatten,
rewrap<T is aggregate ? view<aggregate> : T>
see #263