Patches from Nathan Ridge using SFINAE to disable the Fusion algorithms for non-{Fusion sequence} types

[SVN r78463]
This commit is contained in:
Joel de Guzman
2012-05-14 00:37:21 +00:00
parent 66e8a6d3b7
commit b63c8214d7
15 changed files with 174 additions and 24 deletions

View File

@ -8,6 +8,8 @@
#define FUSION_REVERSE_07212005_1230
#include <boost/fusion/view/reverse_view/reverse_view.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion
{
@ -21,7 +23,12 @@ namespace boost { namespace fusion
}
template <typename Sequence>
inline reverse_view<Sequence const>
inline
typename
enable_if<
traits::is_sequence<Sequence>
, reverse_view<Sequence const>
>::type
reverse(Sequence const& view)
{
return reverse_view<Sequence const>(view);