File indexing completed on 2025-01-19 09:47:48
0001
0002
0003
0004
0005
0006 #ifndef BOOST_SPIRIT_SUPPORT_AUXILIARY_ATTR_CAST_HPP
0007 #define BOOST_SPIRIT_SUPPORT_AUXILIARY_ATTR_CAST_HPP
0008
0009 #if defined(_MSC_VER)
0010 #pragma once
0011 #endif
0012
0013 #include <boost/spirit/home/support/common_terminals.hpp>
0014 #include <boost/spirit/home/support/attributes.hpp>
0015 #include <boost/core/enable_if.hpp>
0016 #include <boost/proto/traits.hpp>
0017
0018 namespace boost { namespace spirit
0019 {
0020
0021
0022
0023 template <typename Expr>
0024 typename enable_if<proto::is_expr<Expr>
0025 , stateful_tag_type<Expr, tag::attr_cast> >::type
0026 attr_cast(Expr const& expr)
0027 {
0028 return stateful_tag_type<Expr, tag::attr_cast>(expr);
0029 }
0030
0031 template <typename Exposed, typename Expr>
0032 typename enable_if<proto::is_expr<Expr>
0033 , stateful_tag_type<Expr, tag::attr_cast, Exposed> >::type
0034 attr_cast(Expr const& expr)
0035 {
0036 return stateful_tag_type<Expr, tag::attr_cast, Exposed>(expr);
0037 }
0038
0039 template <typename Exposed, typename Transformed, typename Expr>
0040 typename enable_if<proto::is_expr<Expr>
0041 , stateful_tag_type<Expr, tag::attr_cast, Exposed, Transformed> >::type
0042 attr_cast(Expr const& expr)
0043 {
0044 return stateful_tag_type<Expr, tag::attr_cast, Exposed, Transformed>(expr);
0045 }
0046 }}
0047
0048 #endif