1 ///////////////////////////////////////////////////////////////////////////////
2 /// \file integral_c.hpp
3 /// Contains definition of the integral_c transform and friends.
5 // Copyright 2011 Eric Niebler. Distributed under the Boost
6 // Software License, Version 1.0. (See accompanying file
7 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 #ifndef BOOST_PROTO_TRANSFORM_INTEGRAL_C_HPP_EAN_04_28_2011
10 #define BOOST_PROTO_TRANSFORM_INTEGRAL_C_HPP_EAN_04_28_2011
12 #include <boost/proto/proto_fwd.hpp>
13 #include <boost/proto/transform/impl.hpp>
15 namespace boost { namespace proto
18 /// \brief A PrimitiveTransform that returns a specified
21 template<typename T, T I>
22 struct integral_c : transform<integral_c<T, I> >
24 template<typename Expr, typename State, typename Data>
25 struct impl : transform_impl<Expr, State, Data>
27 typedef T result_type;
32 typename impl::expr_param
33 , typename impl::state_param
34 , typename impl::data_param
42 /// \brief A PrimitiveTransform that returns a specified
50 /// \brief A PrimitiveTransform that returns a specified
58 /// \brief A PrimitiveTransform that returns a specified
66 /// \brief A PrimitiveTransform that returns a specified
69 template<std::size_t I>
71 : integral_c<std::size_t, I>
76 template<typename T, T I>
77 struct is_callable<integral_c<T, I> >
84 struct is_callable<char_<I> >
91 struct is_callable<int_<I> >
98 struct is_callable<long_<I> >
104 template<std::size_t I>
105 struct is_callable<size_t<I> >