annotate DEPENDENCIES/generic/include/boost/proto/context/null.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 ///////////////////////////////////////////////////////////////////////////////
Chris@16 2 /// \file null.hpp
Chris@16 3 /// Definintion of null_context\<\>, an evaluation context for
Chris@16 4 /// proto::eval() that simply evaluates each child expression, doesn't
Chris@16 5 /// combine the results at all, and returns void.
Chris@16 6 //
Chris@16 7 // Copyright 2008 Eric Niebler. Distributed under the Boost
Chris@16 8 // Software License, Version 1.0. (See accompanying file
Chris@16 9 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 10
Chris@16 11 #ifndef BOOST_PROTO_CONTEXT_NULL_HPP_EAN_06_24_2007
Chris@16 12 #define BOOST_PROTO_CONTEXT_NULL_HPP_EAN_06_24_2007
Chris@16 13
Chris@16 14 #include <boost/preprocessor/iteration/iterate.hpp>
Chris@16 15 #include <boost/preprocessor/repetition/repeat.hpp>
Chris@16 16 #include <boost/proto/proto_fwd.hpp>
Chris@16 17 #include <boost/proto/eval.hpp>
Chris@16 18 #include <boost/proto/traits.hpp>
Chris@16 19
Chris@16 20 namespace boost { namespace proto { namespace context
Chris@16 21 {
Chris@16 22
Chris@16 23 template<
Chris@16 24 typename Expr
Chris@16 25 , typename Context
Chris@16 26 , long Arity // = Expr::proto_arity_c
Chris@16 27 >
Chris@16 28 struct null_eval
Chris@16 29 {};
Chris@16 30
Chris@16 31 template<typename Expr, typename Context>
Chris@16 32 struct null_eval<Expr, Context, 0>
Chris@16 33 {
Chris@16 34 typedef void result_type;
Chris@16 35 void operator()(Expr &, Context &) const
Chris@16 36 {}
Chris@16 37 };
Chris@16 38
Chris@16 39 // Additional specializations generated by the preprocessor
Chris@16 40 #include <boost/proto/context/detail/null_eval.hpp>
Chris@16 41
Chris@16 42 /// null_context
Chris@16 43 ///
Chris@16 44 struct null_context
Chris@16 45 {
Chris@16 46 /// null_context::eval
Chris@16 47 ///
Chris@16 48 template<typename Expr, typename ThisContext = null_context const>
Chris@16 49 struct eval
Chris@16 50 : null_eval<Expr, ThisContext>
Chris@16 51 {};
Chris@16 52 };
Chris@16 53
Chris@16 54 }}}
Chris@16 55
Chris@16 56 #endif