1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 =============================================================================*/
7 #ifndef BOOST_SPIRIT_SUPPORT_DETAIL_WHAT_FUNCTION_HPP
8 #define BOOST_SPIRIT_SUPPORT_DETAIL_WHAT_FUNCTION_HPP
15 #include <boost/spirit/home/support/info.hpp>
16 #include <boost/detail/workaround.hpp>
18 namespace boost { namespace spirit { namespace detail
20 template <typename Context>
23 what_function(info& what_, Context& context_)
24 : what(what_), context(context_)
26 what.value = std::list<info>();
29 template <typename Component>
30 void operator()(Component const& component) const
32 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
33 component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
35 boost::get<std::list<info> >(what.value).
36 push_back(component.what(context));
42 // silence MSVC warning C4512: assignment operator could not be generated
43 BOOST_DELETED_FUNCTION(what_function& operator= (what_function const&))