Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=1d8881f21948cf60cffae87d315340954b1f910d
commit 1d8881f21948cf60cffae87d315340954b1f910d Author: Michel Hermier <[email protected]> Date: Tue May 20 11:33:11 2014 +0200 libpacman: Add variadic version of FCallable. diff --git a/lib/libpacman/util/falgorithms.h b/lib/libpacman/util/falgorithms.h index b1a0a1e..c6629cc 100644 --- a/lib/libpacman/util/falgorithms.h +++ b/lib/libpacman/util/falgorithms.h @@ -21,11 +21,6 @@ #ifndef FALGORITHMS_H #define FALGORITHMS_H -#include <memory> // For std::unique_ptr -#include <vector> // For std::vector - -#include "util.h" // for ASSERT - namespace flib { @@ -65,12 +60,25 @@ class FCallable; template <typename R, typename... Args> struct FCallable<R(Args...)> { + typedef R function_type(Args...); + virtual ~FCallable() { } virtual R operator () (Args...) const = 0; }; +template <typename R, typename... Args> +struct FCallable<R(Args..., ...)> +{ + typedef R function_type(Args..., ...); + + virtual ~FCallable() + { } + + virtual R operator () (Args..., ...) const = 0; +}; + } #endif /* FALGORITHMS_H */ _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
