is_sequence/list fix for MSVC

[SVN r19168]
This commit is contained in:
Aleksey Gurtovoy
2003-07-17 09:26:49 +00:00
parent f5db13e0f0
commit 319ef0fffe
2 changed files with 11 additions and 0 deletions

View File

@@ -19,6 +19,8 @@
#include "boost/mpl/integral_c.hpp" #include "boost/mpl/integral_c.hpp"
#include "boost/mpl/list/aux_/tag.hpp" #include "boost/mpl/list/aux_/tag.hpp"
#include "boost/mpl/aux_/config/msvc.hpp"
#include "boost/mpl/aux_/config/workaround.hpp"
namespace boost { namespace boost {
namespace mpl { namespace mpl {
@@ -30,6 +32,10 @@ template<
> >
struct list_node struct list_node
{ {
// agurt, 17/jul/03: to facilitate the deficient 'is_sequence' implementation
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
typedef int begin;
#endif
typedef aux::list_tag tag; typedef aux::list_tag tag;
typedef list_node type; typedef list_node type;
@@ -40,6 +46,9 @@ struct list_node
struct null_node struct null_node
{ {
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
typedef int begin;
#endif
typedef aux::list_tag tag; typedef aux::list_tag tag;
typedef null_node type; typedef null_node type;
typedef integral_c<long,0> size; typedef integral_c<long,0> size;

View File

@@ -34,7 +34,9 @@ int main()
BOOST_STATIC_ASSERT(!is_sequence< UDT* >::value); BOOST_STATIC_ASSERT(!is_sequence< UDT* >::value);
BOOST_STATIC_ASSERT((is_sequence< range_c<int,0,0> >::value)); BOOST_STATIC_ASSERT((is_sequence< range_c<int,0,0> >::value));
BOOST_STATIC_ASSERT(is_sequence< list<> >::value); BOOST_STATIC_ASSERT(is_sequence< list<> >::value);
BOOST_STATIC_ASSERT(is_sequence< list<int> >::value);
BOOST_STATIC_ASSERT(is_sequence< vector<> >::value); BOOST_STATIC_ASSERT(is_sequence< vector<> >::value);
BOOST_STATIC_ASSERT(is_sequence< vector<int> >::value);
return 0; return 0;
} }