/* * $Id$ */ /* * Copyright (c) 2016 Brook Milligan. * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) */ /* * XXX - this is not part of Boost.Proto; instead, it is illustrative * of a traits class that would make specializing context::eval * classes more straightforward. See the associated example. * * NOTE: for practical use, the terminal class should also be * specialized in the obvious way for boost::proto::basic_expr. */ #ifndef BOOST_PROTO_TRAITS_TERMINAL_HPP #define BOOST_PROTO_TRAITS_TERMINAL_HPP 1 #include namespace boost { namespace proto { namespace type_traits { template < typename Expr > struct terminal; template < typename T > struct terminal< boost::proto::expr< boost::proto::tag::terminal,boost::proto::term,0 > > { typedef T type; }; template < typename T > struct terminal< boost::proto::expr< boost::proto::tag::terminal,boost::proto::term,0 > const > { typedef T type; }; template < typename Expr > using terminal_t = typename terminal::type; } // namespace type_traits } // namespace proto } // namespace boost #endif