Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76353 - in sandbox/closure/boost/closure: aux_ aux_/preprocessor/traits/decl_sign_/validate_ detail/preprocessor/keyword
From: lorcaminiti_at_[hidden]
Date: 2012-01-07 18:45:02


Author: lcaminiti
Date: 2012-01-07 18:45:01 EST (Sat, 07 Jan 2012)
New Revision: 76353
URL: http://svn.boost.org/trac/boost/changeset/76353

Log:
Compiled returning tests.
Added:
   sandbox/closure/boost/closure/aux_/config.hpp (contents, props changed)
   sandbox/closure/boost/closure/aux_/member.hpp (contents, props changed)
   sandbox/closure/boost/closure/aux_/nobind.hpp (contents, props changed)
   sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/validate_/this.hpp (contents, props changed)
   sandbox/closure/boost/closure/detail/preprocessor/keyword/thisunderscore.hpp (contents, props changed)

Added: sandbox/closure/boost/closure/aux_/config.hpp
==============================================================================
--- (empty file)
+++ sandbox/closure/boost/closure/aux_/config.hpp 2012-01-07 18:45:01 EST (Sat, 07 Jan 2012)
@@ -0,0 +1,15 @@
+
+#ifndef BOOST_CLOSURE_AUX_CONFIG_HPP_
+#define BOOST_CLOSURE_AUX_CONFIG_HPP_
+
+#include <boost/closure/config.hpp>
+#include <boost/config_ext.hpp>
+
+#ifdef BOOST_NO_LOCAL_TYPES_AS_TEMPLATE_PARAMS
+# define BOOST_CLOSURE_AUX_CONFIG_LOCAL_TYPES_AS_TEMPLATE_PARAMS_01 0
+#else
+# define BOOST_CLOSURE_AUX_CONFIG_LOCAL_TYPES_AS_TEMPLATE_PARAMS_01 1
+#endif
+
+#endif // #include guard
+

Added: sandbox/closure/boost/closure/aux_/member.hpp
==============================================================================
--- (empty file)
+++ sandbox/closure/boost/closure/aux_/member.hpp 2012-01-07 18:45:01 EST (Sat, 07 Jan 2012)
@@ -0,0 +1,35 @@
+
+#ifndef BOOST_CLOSURE_AUX_MEMBER_HPP_
+#define BOOST_CLOSURE_AUX_MEMBER_HPP_
+
+namespace boost { namespace closure { namespace aux {
+
+template<typename T> struct member_type {
+ typedef T& reference;
+ typedef T* pointer;
+};
+
+template<typename T> struct member_type<T*> {
+ typedef T& reference;
+ typedef T* pointer;
+};
+
+template<typename T> struct member_type<T const*> {
+ typedef T const& reference;
+ typedef T const* pointer;
+};
+
+template<typename T> T* member_addr(T& data) { return &data; }
+template<typename T> T const* member_addr(T const& data) { return &data; }
+template<typename T> T* member_addr(T* data) { return data; }
+template<typename T> T const* member_addr(T const* data) { return data; }
+
+template<typename T> T& member_deref(T& data) { return data; }
+template<typename T> T const& member_deref(T const& data) { return data; }
+template<typename T> T& member_deref(T* data) { return *data; }
+template<typename T> T const& member_deref(T const* data) { return *data; }
+
+}}} // namespace
+
+#endif // #include guard
+

Added: sandbox/closure/boost/closure/aux_/nobind.hpp
==============================================================================
--- (empty file)
+++ sandbox/closure/boost/closure/aux_/nobind.hpp 2012-01-07 18:45:01 EST (Sat, 07 Jan 2012)
@@ -0,0 +1,22 @@
+
+#ifndef BOOST_CLOSURE_AUX_NOBIND_HPP_
+#define BOOST_CLOSURE_AUX_NOBIND_HPP_
+
+#include <boost/closure/aux_/config.hpp>
+
+// NOTE: The current implementation needs no-bind placeholders only when
+// local types cannot be passed as template parameters.
+#if !BOOST_CLOSURE_AUX_CONFIG_LOCAL_TYPES_AS_TEMPLATE_PARAMS_01
+
+namespace boost { namespace closure { namespace aux {
+
+typedef int nobind_t;
+
+nobind_t nobind;
+
+}}} // namespace
+
+#endif
+
+#endif // #include guard
+

Added: sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/validate_/this.hpp
==============================================================================
--- (empty file)
+++ sandbox/closure/boost/closure/aux_/preprocessor/traits/decl_sign_/validate_/this.hpp 2012-01-07 18:45:01 EST (Sat, 07 Jan 2012)
@@ -0,0 +1,43 @@
+
+#ifndef BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_THIS_HPP_
+#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_THIS_HPP_
+
+#include <boost/closure/detail/preprocessor/keyword/this.hpp>
+#include <boost/closure/detail/preprocessor/keyword/const.hpp>
+#include <boost/closure/detail/preprocessor/keyword/bind.hpp>
+#include <boost/closure/detail/preprocessor/keyword/const_bind.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/tuple/eat.hpp>
+#include <boost/preprocessor/facilities/empty.hpp>
+#include <boost/preprocessor/seq/fold_left.hpp>
+
+// PRIVATE //
+
+#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_THIS_VAR_( \
+ s, error, elem) \
+ BOOST_PP_IIF(BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_THIS_BACK( \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_BIND_REMOVE_FRONT( \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_CONST_REMOVE_FRONT(elem))), \
+ ERROR_use_this_underscore_instead_of_this BOOST_PP_EMPTY \
+ , \
+ error \
+ )
+
+#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_THIS_(s, error, elem) \
+ BOOST_PP_IIF(BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_BIND_FRONT(elem), \
+ BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_THIS_VAR_ \
+ , BOOST_PP_IIF(BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_CONST_BIND_FRONT(elem), \
+ BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_THIS_VAR_ \
+ , \
+ error BOOST_PP_TUPLE_EAT(3) \
+ ))(s, error, elem)
+
+// PUBLIC //
+
+#define BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_THIS(sign) \
+ BOOST_PP_SEQ_FOLD_LEFT( \
+ BOOST_CLOSURE_AUX_PP_DECL_TRAITS_SIGN_VALIDATE_THIS_, \
+ BOOST_PP_EMPTY, sign)
+
+#endif // #include guard
+

Added: sandbox/closure/boost/closure/detail/preprocessor/keyword/thisunderscore.hpp
==============================================================================
--- (empty file)
+++ sandbox/closure/boost/closure/detail/preprocessor/keyword/thisunderscore.hpp 2012-01-07 18:45:01 EST (Sat, 07 Jan 2012)
@@ -0,0 +1,57 @@
+
+// Copyright (C) 2009-2011 Lorenzo Caminiti
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0 (see accompanying file LICENSE_1_0.txt or a
+// copy at http://www.boost.org/LICENSE_1_0.txt).
+
+#ifndef BOOST_CLOSURE_DETAIL_PP_KEYWORD_THISUNDERSCORE_HPP_
+#define BOOST_CLOSURE_DETAIL_PP_KEYWORD_THISUNDERSCORE_HPP_
+
+#include <boost/closure/detail/preprocessor/keyword/facility/is.hpp>
+#include <boost/closure/detail/preprocessor/keyword/facility/add.hpp>
+#include <boost/closure/detail/preprocessor/keyword/facility/remove.hpp>
+
+// PRIVATE //
+
+// These are not local macros -- DO NOT #UNDEF.
+#define BOOST_CLOSURE_DETAIL_PP_KEYWORD_THISUNDERSCORE_ISthis_ (1) /* unary */
+#define this_BOOST_CLOSURE_DETAIL_PP_KEYWORD_THISUNDERSCORE_IS (1) /* unary */
+#define BOOST_CLOSURE_DETAIL_PP_KEYWORD_THISUNDERSCORE_REMOVEthis_ /* nothing */
+#define this_BOOST_CLOSURE_DETAIL_PP_KEYWORD_THISUNDERSCORE_REMOVE /* nothing */
+
+// PUBLIC //
+
+// Is.
+
+#define BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_THISUNDERSCORE_FRONT(tokens) \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_FACILITY_IS_FRONT(tokens, \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_THISUNDERSCORE_IS)
+
+#define BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_THISUNDERSCORE_BACK(token) \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_FACILITY_IS_BACK(token, \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_THISUNDERSCORE_IS)
+
+// Remove.
+
+#define BOOST_CLOSURE_DETAIL_PP_KEYWORD_THISUNDERSCORE_REMOVE_FRONT(tokens) \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_FACILITY_REMOVE_FRONT(tokens, \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_THISUNDERSCORE_FRONT, \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_THISUNDERSCORE_REMOVE)
+
+#define BOOST_CLOSURE_DETAIL_PP_KEYWORD_THISUNDERSCORE_REMOVE_BACK(tokens) \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_FACILITY_REMOVE_BACK(tokens, \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_THISUNDERSCORE_BACK, \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_THISUNDERSCORE_REMOVE)
+
+// Add.
+
+#define BOOST_CLOSURE_DETAIL_PP_KEYWORD_THISUNDERSCORE_ADD_FRONT(tokens) \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_FACILITY_ADD_FRONT(tokens, \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_THISUNDERSCORE_FRONT, this_)
+
+#define BOOST_CLOSURE_DETAIL_PP_KEYWORD_THISUNDERSCORE_ADD_BACK(tokens) \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_FACILITY_ADD_BACK(tokens, \
+ BOOST_CLOSURE_DETAIL_PP_KEYWORD_IS_THISUNDERSCORE_BACK, this_)
+
+#endif // #include guard
+


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