|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71948 - sandbox/local/libs/local/example
From: lorcaminiti_at_[hidden]
Date: 2011-05-14 15:28:07
Author: lcaminiti
Date: 2011-05-14 15:28:06 EDT (Sat, 14 May 2011)
New Revision: 71948
URL: http://svn.boost.org/trac/boost/changeset/71948
Log:
Added parsing macro example.
Added:
sandbox/local/libs/local/example/parsing_macros_impl.cpp (contents, props changed)
Added: sandbox/local/libs/local/example/parsing_macros_impl.cpp
==============================================================================
--- (empty file)
+++ sandbox/local/libs/local/example/parsing_macros_impl.cpp 2011-05-14 15:28:06 EDT (Sat, 14 May 2011)
@@ -0,0 +1,24 @@
+
+//[parsing_macros_impl_cpp
+#include <boost/detail/preprocessor/keyword/this.hpp>
+#include <boost/detail/preprocessor/keyword/const.hpp>
+#include <boost/local/aux_/preprocessor/keyword/bind.hpp>
+#include <cassert>
+
+int main() {
+ // Detect `this`.
+ assert( BOOST_DETAIL_PP_KEYWORD_IS_THIS_BACK(
+ BOOST_LOCAL_AUX_PP_KEYWORD_BIND_REMOVE_FRONT(
+ BOOST_DETAIL_PP_KEYWORD_CONST_REMOVE_FRONT(
+ const bind this
+ ))) == 1 );
+ assert( BOOST_DETAIL_PP_KEYWORD_IS_THIS_BACK(
+ BOOST_LOCAL_AUX_PP_KEYWORD_BIND_REMOVE_FRONT(
+ BOOST_DETAIL_PP_KEYWORD_CONST_REMOVE_FRONT(
+ const bind& x
+ ))) == 0 );
+
+ return 0;
+}
+//]
+
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