Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51597 - sandbox/reference_closure
From: dave_at_[hidden]
Date: 2009-03-03 22:39:55


Author: dave
Date: 2009-03-03 22:39:54 EST (Tue, 03 Mar 2009)
New Revision: 51597
URL: http://svn.boost.org/trac/boost/changeset/51597

Log:
Separate TU for parallel library to eliminate the possibility of constant folding on function pointers
(addendum; missed callback_type.h)

Added:
   sandbox/reference_closure/callback_type.h (contents, props changed)

Added: sandbox/reference_closure/callback_type.h
==============================================================================
--- (empty file)
+++ sandbox/reference_closure/callback_type.h 2009-03-03 22:39:54 EST (Tue, 03 Mar 2009)
@@ -0,0 +1,20 @@
+// Copyright David Abrahams 2009. Distributed under 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)
+#ifndef CALLBACK_TYPE_DWA200933_H
+# define CALLBACK_TYPE_DWA200933_H
+
+# include "trivial_closure.h"
+
+# if REFERENCE_CLOSURE
+
+typedef closure callback_type;
+
+# elif STD_FUNCTION
+
+# include <tr1/functional>
+typedef std::tr1::function<void()> callback_type;
+
+# endif
+
+#endif // CALLBACK_TYPE_DWA200933_H


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