Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=d27959b502c991829839e10e50b749473e0b7b9e

commit d27959b502c991829839e10e50b749473e0b7b9e
Author: Michel Hermier <[email protected]>
Date:   Tue May 20 12:32:36 2014 +0200

libpacman: Move FCallable to ffunctionnal.h.

diff --git a/lib/libpacman/CMakeLists.txt b/lib/libpacman/CMakeLists.txt
index e8723ee..c42eb66 100644
--- a/lib/libpacman/CMakeLists.txt
+++ b/lib/libpacman/CMakeLists.txt
@@ -27,6 +27,7 @@ set(FLIB_SOURCES
util/flist.h
util/ffilelogger.c
util/ffilelogger.h
+       util/ffunctional.h
util/flog.c
util/flog.h
util/flogger.c
diff --git a/lib/libpacman/kernel/fsignal.h b/lib/libpacman/kernel/fsignal.h
index 157fea1..6c84a2d 100644
--- a/lib/libpacman/kernel/fsignal.h
+++ b/lib/libpacman/kernel/fsignal.h
@@ -22,6 +22,7 @@
#define FSIGNAL_H

#include "util/falgorithms.h"
+#include "util/ffunctional.h"

#include <memory> // For std::unique_ptr
#include <vector> // For std::vector
diff --git a/lib/libpacman/util/falgorithms.h b/lib/libpacman/util/falgorithms.h
index c6629cc..4e28e4a 100644
--- a/lib/libpacman/util/falgorithms.h
+++ b/lib/libpacman/util/falgorithms.h
@@ -54,31 +54,6 @@ struct FAccumulator<void>
{ }
};

-template <typename>
-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 */
diff --git a/lib/libpacman/util/ffunctional.h b/lib/libpacman/util/ffunctional.h
new file mode 100644
index 0000000..55ed8e4
--- /dev/null
+++ b/lib/libpacman/util/ffunctional.h
@@ -0,0 +1,58 @@
+/*
+ *  ffunctional.h
+ *
+ *  Copyright (c) 2014 by Michel Hermier <[email protected]>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ *  USA.
+ */
+#ifndef FFUNCTIONAL_H
+#define FFUNCTIONAL_H
+
+#include <functional>
+
+namespace flib
+{
+
+template <typename>
+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 /* FFUNCTIONAL_H */
+
+/* vim: set ts=2 sw=2 noet: */
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to