Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52776 - sandbox/boost0x/boost/function
From: sebastian.redl_at_[hidden]
Date: 2009-05-05 18:00:15


Author: cornedbee
Date: 2009-05-05 18:00:14 EDT (Tue, 05 May 2009)
New Revision: 52776
URL: http://svn.boost.org/trac/boost/changeset/52776

Log:
Skeleton for variadic function
Added:
   sandbox/boost0x/boost/function/function_variadic.hpp (contents, props changed)

Added: sandbox/boost0x/boost/function/function_variadic.hpp
==============================================================================
--- (empty file)
+++ sandbox/boost0x/boost/function/function_variadic.hpp 2009-05-05 18:00:14 EDT (Tue, 05 May 2009)
@@ -0,0 +1,41 @@
+// Boost.Function library
+
+// Copyright Douglas Gregor 2001-2006
+// Copyright Emil Dotchevski 2007
+// Use, modification and distribution is subject to the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://www.boost.org
+
+#include <boost/function/detail/prologue.hpp>
+
+namespace boost
+{
+ namespace detail
+ {
+ namespace function
+ {
+ struct not_a_std_function {};
+
+ template <typename R, typename ... Args>
+ struct which_std_function {
+ typedef not_a_std_function type;
+ };
+ template <typename R, typename Arg1>
+ struct which_std_function<R, Arg1> {
+ typedef std::unary_function<Arg1, R> type;
+ };
+ template <typename R, typename Arg1, typename Arg2>
+ struct which_std_function<R, Arg1, Arg2> {
+ typedef std::unary_function<Arg1, Arg2, R> type;
+ };
+ }
+ }
+
+ template <typename R, typename ... Args>
+ class function<R (Args...)> : public function_base,
+ public detail::function::which_std_function<R, Args...>::type
+ {
+ };
+}


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk