From 4a2384e242f8ddc69f6f66253f2f45ec46fb3c91 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 11 Aug 2017 22:31:02 +0200 Subject: [PATCH] DiffMessage: add further convenience ctor for varargs hey... all my dream constructors became true --- src/lib/diff/diff-message.hpp | 10 ++++++++++ wiki/thinkPad.ichthyo.mm | 16 ++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/lib/diff/diff-message.hpp b/src/lib/diff/diff-message.hpp index 0626e3236..4a2305f6d 100644 --- a/src/lib/diff/diff-message.hpp +++ b/src/lib/diff/diff-message.hpp @@ -117,6 +117,16 @@ namespace diff{ : DiffMessage{iter_stl::snapshot (move(ili))} { } + /** + * Convenience builder to take an arbitrary number of DiffStep arguments + * @note like for the initializer_list, arguments will be copied into + * a _heap allocated snapshot_ + */ + template + DiffMessage(ARGS&& ...args) + : DiffMessage{ {std::forward(args)...} } + { } + /** * Convenience builder to piggyback any Lumiera Forward Iterator * @note source iterator is copied into a heap allocated IterSource diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index e03e848c0..8ba97c972 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -11273,11 +11273,13 @@ - - + + - - + + + + @@ -16712,6 +16714,12 @@ + + + + + +