Chris@16: /*============================================================================== Chris@16: Copyright (c) 2001-2010 Joel de Guzman Chris@16: Copyright (c) 2010 Eric Niebler Chris@16: Copyright (c) 2010-2011 Thomas Heller Chris@16: Chris@16: Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: ==============================================================================*/ Chris@16: #ifndef BOOST_PHOENIX_CORE_ARGUMENT_HPP Chris@16: #define BOOST_PHOENIX_CORE_ARGUMENT_HPP Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: namespace boost { namespace phoenix Chris@16: { Chris@16: //////////////////////////////////////////////////////////////////////////// Chris@16: // Chris@16: // argument Chris@16: // Chris@16: // function for evaluating argument placeholders like: _1 Chris@16: // Chris@16: //////////////////////////////////////////////////////////////////////////// Chris@16: Chris@16: template Chris@16: struct argument Chris@16: //: mpl::int_ Chris@16: { Chris@16: typedef typename mpl::int_::value_type value_type; Chris@16: static const value_type value = mpl::int_::value; Chris@16: Chris@16: bool operator==(argument) const Chris@16: { Chris@16: return true; Chris@16: } Chris@16: Chris@16: template Chris@16: bool operator==(argument) const Chris@16: { Chris@16: return false; Chris@16: } Chris@16: }; Chris@16: }} Chris@16: Chris@16: namespace boost { Chris@16: template Chris@16: struct is_placeholder > Chris@16: : mpl::int_ Chris@16: {}; Chris@16: } Chris@16: Chris@16: namespace boost { namespace phoenix Chris@16: { Chris@16: namespace expression Chris@16: { Chris@16: template Chris@16: struct argument Chris@16: : expression::terminal > Chris@16: { Chris@16: typedef typename expression::terminal >::type type; Chris@16: static const type make() Chris@16: { Chris@16: type const e = {{{}}}; Chris@16: return e; Chris@16: } Chris@16: }; Chris@16: } Chris@16: Chris@16: #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES) Chris@16: Chris@16: #include Chris@16: Chris@16: #else Chris@16: Chris@16: #if !defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES) Chris@16: #include Chris@16: #else Chris@16: Chris@16: #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES) Chris@16: #pragma wave option(preserve: 2, line: 0, output: "preprocessed/argument_predefined_" BOOST_PHOENIX_LIMIT_STR ".hpp") Chris@16: #endif Chris@16: /*============================================================================== Chris@16: Copyright (c) 2001-2010 Joel de Guzman Chris@16: Copyright (c) 2010-2011 Thomas Heller Chris@16: Chris@16: Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: ==============================================================================*/ Chris@16: Chris@16: #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES) Chris@16: #pragma wave option(preserve: 1) Chris@16: #endif Chris@16: Chris@16: #ifdef BOOST_PHOENIX_NO_PREDEFINED_TERMINALS Chris@16: #undef BOOST_PHOENIX_NO_PREDEFINED_TERMINALS Chris@16: #define BOOST_PHOENIX_NO_PREDEFINED_TERMINALS_RESTORE Chris@16: #endif Chris@16: Chris@16: #include Chris@16: Chris@16: #ifndef BOOST_PHOENIX_NO_PREDEFINED_TERMINALS_RESTORE Chris@16: #define BOOST_PHOENIX_NO_PREDEFINED_TERMINALS Chris@16: #undef BOOST_PHOENIX_NO_PREDEFINED_TERIMINALS_RESTORE Chris@16: #endif Chris@16: Chris@16: #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES) Chris@16: #pragma wave option(output: null) Chris@16: #endif Chris@16: Chris@16: #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES) Chris@16: #pragma wave option(preserve: 2, line: 0, output: "preprocessed/argument_no_predefined_" BOOST_PHOENIX_LIMIT_STR ".hpp") Chris@16: #endif Chris@16: /*============================================================================== Chris@16: Copyright (c) 2001-2010 Joel de Guzman Chris@16: Copyright (c) 2010-2011 Thomas Heller Chris@16: Chris@16: Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: ==============================================================================*/ Chris@16: Chris@16: #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES) Chris@16: #pragma wave option(preserve: 1) Chris@16: #endif Chris@16: Chris@16: #ifndef BOOST_PHOENIX_NO_PREDEFINED_TERMINALS Chris@16: #define BOOST_PHOENIX_NO_PREDEFINED_TERMINALS Chris@16: #define BOOST_PHOENIX_NO_PREDEFINED_TERMINALS_RESTORE Chris@16: #endif Chris@16: Chris@16: #include Chris@16: Chris@16: #ifndef BOOST_PHOENIX_NO_PREDEFINED_TERMINALS_RESTORE Chris@16: #undef BOOST_PHOENIX_NO_PREDEFINED_TERMINALS Chris@16: #undef BOOST_PHOENIX_NO_PREDEFINED_TERIMINALS_RESTORE Chris@16: #endif Chris@16: Chris@16: #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES) Chris@16: #pragma wave option(output: null) Chris@16: #endif Chris@16: Chris@16: #endif Chris@16: Chris@16: #endif Chris@16: Chris@16: }} Chris@16: Chris@16: #endif