1 /*=============================================================================
2 Copyright (c) 2019 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 #if !defined(BOOST_SPIRIT_X3_PSEUDO_ATTRIBUTE_OF_MAY_15_2019_1012PM)
8 #define BOOST_SPIRIT_X3_PSEUDO_ATTRIBUTE_OF_MAY_15_2019_1012PM
12 namespace boost { namespace spirit { namespace x3 { namespace traits
14 ///////////////////////////////////////////////////////////////////////////
15 // Pseudo attributes are placeholders for parsers that can only know
16 // its actual attribute at parse time. This trait customization point
17 // provides a mechanism to convert the trait to the actual trait at
19 ///////////////////////////////////////////////////////////////////////////
20 template <typename Context, typename Attribute, typename Iterator
21 , typename Enable = void>
22 struct pseudo_attribute
24 using attribute_type = Attribute;
25 using type = Attribute;
27 static type&& call(Iterator&, Iterator const&, attribute_type&& attr)
29 return std::forward<type>(attr);