1 /* Copyright 2006-2009 Joaquin M Lopez Munoz.
2 * Distributed under the Boost Software License, Version 1.0.
3 * (See accompanying file LICENSE_1_0.txt or copy at
4 * http://www.boost.org/LICENSE_1_0.txt)
6 * See http://www.boost.org/libs/flyweight for library home page.
9 #ifndef BOOST_FLYWEIGHT_DETAIL_NESTED_XXX_IF_NOT_PH_HPP
10 #define BOOST_FLYWEIGHT_DETAIL_NESTED_XXX_IF_NOT_PH_HPP
16 #include <boost/flyweight/detail/is_placeholder_expr.hpp>
17 #include <boost/mpl/if.hpp>
19 /* nested_##name##_if_not_placeholder_expression<T>::type is T::name unless
20 * T is an MPL placeholder expression, in which case it defaults to int.
23 #define BOOST_FLYWEIGHT_NESTED_XXX_IF_NOT_PLACEHOLDER_EXPRESSION_DEF(name) \
24 struct nested_##name##_if_not_placeholder_expression_helper \
29 template<typename T> \
30 struct nested_##name##_if_not_placeholder_expression \
32 typedef typename boost::mpl::if_< \
33 boost::flyweights::detail::is_placeholder_expression<T>, \
34 nested_##name##_if_not_placeholder_expression_helper, \