/////////////////////////////////////////////////////////////////////////////// /// \file domain.hpp /// Contains definition of domain\<\> class template, for defining domains /// with a grammar for controlling operator overloading. // // Copyright 2007 Eric Niebler. 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) #ifndef BOOST_PROTO_DOMAIN_HPP_EAN_02_13_2007 #define BOOST_PROTO_DOMAIN_HPP_EAN_02_13_2007 #include #include #include #include #include namespace boost { namespace proto { namespace detail { struct not_a_generator {}; struct not_a_grammar {}; } namespace domainns_ { template struct domain : Generator { typedef Grammar grammar; /// INTERNAL ONLY /// typedef void proto_is_domain_; }; struct default_domain : domain<> {}; struct deduce_domain : domain {}; } namespace result_of { template struct is_domain : mpl::false_ {}; template struct is_domain : mpl::true_ {}; template struct domain_of { typedef default_domain type; }; template struct domain_of { typedef typename T::proto_domain type; }; } }} #endif