mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-03 23:04:33 +02:00
Workaround for a heinous vc7 bug
[SVN r19414]
This commit is contained in:
@@ -70,14 +70,28 @@ namespace boost { namespace mpl { namespace aux {
|
|||||||
|
|
||||||
struct has_xxx_tag;
|
struct has_xxx_tag;
|
||||||
|
|
||||||
|
# if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
|
||||||
|
template <class U>
|
||||||
|
struct msvc_incomplete_array
|
||||||
|
{
|
||||||
|
typedef char (&type)[sizeof(U) + 1];
|
||||||
|
};
|
||||||
|
# endif
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct msvc_is_incomplete
|
struct msvc_is_incomplete
|
||||||
{
|
{
|
||||||
// MSVC is capable of some kinds of SFINAE. If U is an incomplete
|
// MSVC is capable of some kinds of SFINAE. If U is an incomplete
|
||||||
// type, it won't pick the second overload
|
// type, it won't pick the second overload
|
||||||
static char tester(...);
|
static char tester(...);
|
||||||
|
|
||||||
|
# if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
|
||||||
template <class U>
|
template <class U>
|
||||||
static char(& tester(type_wrapper<U>) )[sizeof(U) + 1];
|
static typename msvc_incomplete_array<U>::type tester(type_wrapper<U>);
|
||||||
|
# else
|
||||||
|
template <class U>
|
||||||
|
static char (& tester(type_wrapper<U>) )[sizeof(U)+1];
|
||||||
|
# endif
|
||||||
|
|
||||||
BOOST_STATIC_CONSTANT(
|
BOOST_STATIC_CONSTANT(
|
||||||
bool, value = sizeof(tester(type_wrapper<T>())) == 1);
|
bool, value = sizeof(tester(type_wrapper<T>())) == 1);
|
||||||
|
Reference in New Issue
Block a user