From df84de2e81f3bc8a167c99ea142a10b4aa137245 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Thu, 19 Jan 2017 03:44:27 +0100 Subject: [PATCH] Library: remove the dispatchSequenced helper ...such can be done way more succinctly with Lambdas now --- src/lib/functor-util.hpp | 50 ---------------------------------------- 1 file changed, 50 deletions(-) diff --git a/src/lib/functor-util.hpp b/src/lib/functor-util.hpp index 3ec6dce42..c2561e7a7 100644 --- a/src/lib/functor-util.hpp +++ b/src/lib/functor-util.hpp @@ -50,56 +50,6 @@ namespace util { ////////////TODO: refactor namespace. But probably not directly using std::bind; using std::placeholders::_1; - - /** "Combiner" which calls two functions one after another - * returning the result of the second invocation. */ - template - struct CombineSequenced; - - template - struct CombineSequenced - { - typedef function Func; - - static RET - dispatch (Func first, Func second, ARG arg) - { - first (arg); - return second (arg); - } - }; - - - template< typename SIG - , class COM = CombineSequenced - > - class Dispatch - : public function - { - typedef typename COM::Func Func; - - public: - Dispatch (Func const& f1, - Func const& f2) - : Func (bind (&COM::dispatch, f1, f2, _1)) - { } - }; - - - /** convenience shortcut to call two functors in sequence. - * @return a Dispatch functor object which incorporates the - * functors as copy and on invocation calls the first - * function and then returns the result of the second */ - template - Dispatch - dispatchSequenced (function const& f1, - function const& f2) - { - return Dispatch (f1, f2); - } - - - namespace { // hiding some nasty details... using lib::HashVal;