mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-03 14:54:30 +02:00
is_sequence/list fix for MSVC
[SVN r19168]
This commit is contained in:
@@ -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;
|
||||||
|
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user