RE: [Boost-users] Re: Config question:BOOST_NO_INTRINSIC_WCHAR_T(Intel7.1)
Christopher D. Russell
Thanks to Ben, Aleksey & John for the quick responses.
And yes we know this is pain Actually adding a command line switch, or punching the define into user.hpp isn't all too bad in the grand scheme of things.
Until Intel provides the cues required, may I suggest that a comment be placed in boost/type_traits/is_integral.h at line 38:
#ifndef BOOST_NO_INTRINSIC_WCHAR_T // If the following line fails to compile and you're using the Intel // compiler, see // http://lists.boost.org/MailArchives/boost-users/msg06567.php <snip>
It seems to me that it would be better still to put
#ifdef BOOST_NO_INTRINSIC_WCHAR_T
BOOST_STATIC_ASSERT(is_same
It seems to me that it would be better still to put
#ifdef BOOST_NO_INTRINSIC_WCHAR_T BOOST_STATIC_ASSERT(is_same
::value); #else BOOST_STATIC_ASSERT(!is_same ::value); #endif after the conditional definition of BOOST_NO_INTRINSIC_WCHAR_T to verify that the macro has been set/unset correctly.
Not a bad idea, but it brings in a lot of type-traits code that may not actually be needed... John.
John Maddock wrote:
It seems to me that it would be better still to put
#ifdef BOOST_NO_INTRINSIC_WCHAR_T BOOST_STATIC_ASSERT(is_same
::value); #else BOOST_STATIC_ASSERT(!is_same ::value); #endif after the conditional definition of BOOST_NO_INTRINSIC_WCHAR_T to verify that the macro has been set/unset correctly.
Not a bad idea, but it brings in a lot of type-traits code that may not actually be needed...
Actually, it could be as simple as
#if defined(BOOST_NO_INTRINSIC_WCHAR_T)
template< typename T > struct assert_no_intrinsic_wchar_t;
template<> struct assert_no_intrinsic_wchar_t
Actually, it could be as simple as
#if defined(BOOST_NO_INTRINSIC_WCHAR_T) template< typename T > struct assert_no_intrinsic_wchar_t; template<> struct assert_no_intrinsic_wchar_t
{ typedef void type; }; typedef assert_no_intrinsic_wchar_t<unsigned short>::type assert_no_intrinsic_wchar_t_; #else template< typename T > struct assert_intrinsic_wchar_t; template<> struct assert_intrinsic_wchar_t {}; template<> struct assert_intrinsic_wchar_t<unsigned short> {}; #endif With an appropriate comment as suggested by Christopher, it'd be a noticable improvement over the status quo.
Good thinking, will do. John.
participants (3)
-
Aleksey Gurtovoy
-
Ben Hutchings
-
John Maddock