1 ///////////////////////////////////////////////////////////////////////////////
2 /// \file empty.hpp
3 /// Proto callables for boost::empty()
4 //
5 //  Copyright 2012 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)
8 
9 #ifndef BOOST_PROTO_FUNCTIONAL_RANGE_EMPTY_HPP_EAN_27_08_2012
10 #define BOOST_PROTO_FUNCTIONAL_RANGE_EMPTY_HPP_EAN_27_08_2012
11 
12 #include <boost/range/empty.hpp>
13 #include <boost/proto/proto_fwd.hpp>
14 
15 namespace boost { namespace proto { namespace functional
16 {
17 
18     // A PolymorphicFunctionObject that wraps boost::empty()
19     struct empty
20     {
21         BOOST_PROTO_CALLABLE()
22 
23         typedef bool result_type;
24 
25         template<typename Rng>
operator ()boost::proto::functional::empty26         bool operator()(Rng const &rng) const
27         {
28             return boost::empty(rng);
29         }
30     };
31 
32 }}}
33 
34 #endif
35