// Copyright 2008-2010 Gordon Woodhull // 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_MSM_MPL_GRAPH_MPL_UTILS_HPP_INCLUDED #define BOOST_MSM_MPL_GRAPH_MPL_UTILS_HPP_INCLUDED #include #include #include #include #include #include #include #include namespace boost { namespace msm { namespace mpl_graph { namespace mpl_utils { // This is a grab bag of little metafunctions I expect already // exist under some name I haven't looked for // I figure there are probably better ways to do all of these things, // but for now I'll just write some utilities to isolate my ignorance template struct as_map : mpl::fold, mpl::insert > {}; template struct as_set : mpl::fold, mpl::insert > {}; template struct at_or_default : mpl::if_::type, typename mpl::at::type, Default> {}; template struct set_equal : mpl::fold::type, mpl::_2 > > > {}; } } } } #endif // BOOST_MSM_MPL_GRAPH_MPL_UTILS_HPP_INCLUDED