mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-02 06:15:23 +02:00
fixing the issue for empty_sequence's as well
This commit is contained in:
@@ -23,7 +23,8 @@ namespace boost { namespace mpl {
|
|||||||
|
|
||||||
struct empty_sequence
|
struct empty_sequence
|
||||||
{
|
{
|
||||||
struct tag;
|
struct tag;
|
||||||
|
typedef empty_sequence type;
|
||||||
struct begin { typedef random_access_iterator_tag category; };
|
struct begin { typedef random_access_iterator_tag category; };
|
||||||
typedef begin end;
|
typedef begin end;
|
||||||
};
|
};
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
#include <boost/mpl/distance.hpp>
|
#include <boost/mpl/distance.hpp>
|
||||||
#include <boost/mpl/advance.hpp>
|
#include <boost/mpl/advance.hpp>
|
||||||
#include <boost/mpl/begin_end.hpp>
|
#include <boost/mpl/begin_end.hpp>
|
||||||
|
#include <boost/mpl/equal.hpp>
|
||||||
#include <boost/mpl/aux_/test.hpp>
|
#include <boost/mpl/aux_/test.hpp>
|
||||||
|
|
||||||
#include <boost/type_traits/is_same.hpp>
|
#include <boost/type_traits/is_same.hpp>
|
||||||
@@ -33,4 +34,6 @@ MPL_TEST_CASE()
|
|||||||
|
|
||||||
typedef advance_c<begin,0>::type advanced;
|
typedef advance_c<begin,0>::type advanced;
|
||||||
MPL_ASSERT(( is_same<advanced,end> ));
|
MPL_ASSERT(( is_same<advanced,end> ));
|
||||||
|
|
||||||
|
MPL_ASSERT(( equal< empty_sequence, empty_sequence::type > ));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user