Patch by Nathan Ridge to allow BOOST_FUSION_ADAPT_ADT adapted classes to be compared using relational operators.

[SVN r78490]
This commit is contained in:
Joel de Guzman
2012-05-17 01:10:20 +00:00
parent 51ade6529c
commit 8ce40ebd0c
9 changed files with 69 additions and 17 deletions

View File

@ -12,13 +12,28 @@
#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/fusion/support/as_const.hpp>
#include <boost/fusion/adapted/struct/detail/extension.hpp>
namespace boost { namespace fusion { namespace detail
{
template <typename T, typename Dummy>
struct get_identity
: remove_const<typename remove_reference<T>::type>
{};
}}}
namespace boost { namespace fusion
{
namespace detail
{
template <typename T, typename Dummy>
struct get_identity
: remove_const<typename remove_reference<T>::type>
{};
}
namespace extension
{
// Overload as_const() to unwrap adt_attribute_proxy.
template <typename T, int N, bool Const>
typename adt_attribute_proxy<T, N, Const>::type as_const(const adt_attribute_proxy<T, N, Const>& proxy)
{
return proxy.get();
}
}
}}
#endif