Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/spirit/home/support/detail/what_function.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003 
0004     Distributed under the Boost Software License, Version 1.0. (See accompanying
0005     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 =============================================================================*/
0007 #ifndef BOOST_SPIRIT_SUPPORT_DETAIL_WHAT_FUNCTION_HPP
0008 #define BOOST_SPIRIT_SUPPORT_DETAIL_WHAT_FUNCTION_HPP
0009 
0010 #if defined(_MSC_VER)
0011 #pragma once
0012 #endif
0013 
0014 #include <string>
0015 #include <boost/spirit/home/support/info.hpp>
0016 #include <boost/detail/workaround.hpp>
0017 
0018 namespace boost { namespace spirit { namespace detail
0019 {
0020 #ifdef _MSC_VER
0021 #  pragma warning(push)
0022 #  pragma warning(disable: 4512) // assignment operator could not be generated.
0023 #endif
0024     template <typename Context>
0025     struct what_function
0026     {
0027         what_function(info& what_, Context& context_)
0028           : what(what_), context(context_)
0029         {
0030             what.value = std::list<info>();
0031         }
0032 
0033         template <typename Component>
0034         void operator()(Component const& component) const
0035         {
0036 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
0037             (void)component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
0038 #endif
0039             boost::get<std::list<info> >(what.value).
0040                 push_back(component.what(context));
0041         }
0042 
0043         info& what;
0044         Context& context;
0045     };
0046 #ifdef _MSC_VER
0047 #  pragma warning(pop)
0048 #endif
0049 }}}
0050 
0051 #endif