Boost logo

Boost Users :

From: Christopher D. Russell (cdr_at_[hidden])
Date: 2004-04-29 01:35:06


Some additional information pertaining to BOOST_NO_INTRINSIC_WCHAR_T using
the Intel C++ 7.1 compiler in my MSVC 6 SP6 environment:

Using Boost v1.31.0 + STLport v5.0-125 + Intel C++ v7.1 (I updated to build
20030910Z) inside of MSVC 6 SP6 with a fairly recent MS Platform SDK, I
simply could not get boost/config/compiler/intel.hpp to send me down the road
to glory.

Inside of config/compiler/intel.hpp, _WCHAR_T_DEFINED is defined resulting in
BOOST_NO_INTRINSIC_WCHAR_T not being set. Subsequently, this results in the
compile-time error:

boost/type_traits/is_integral.hpp(38): error: class
"boost::is_integral<unsigned short>" has already been defined

Per "Compiler errors with Intel 7.1 and type_traits"
(http://lists.boost.org/MailArchives/boost/msg53033.php), specifically John
Maddock's reply (http://lists.boost.org/MailArchives/boost/msg53121.php), I
short-circuited the logic in config/compiler/intel.hpp and explicitly defined
BOOST_NO_INTRINSIC_WCHAR_T in config/user.hpp. This seems to work acceptably
for this project. But I'm not at all comfortable with this solution because I
really don't understand what the fundamental issue is with all this wchar_t
stuff.

Forgive my ignorance but if, with my current working config, if I declare a
wchar_t type in my code I will get a 16-bit UCS-2 character. Correct? Having
now poured over all postings related to this subject in the archive, I have
an inkling that the root of all this stems from the way the compiler handles
type aliasing? That is, with BOOST_NO_INTRINSIC_WCHAR_T a defined a wchar_t
is actually an alias for an unsigned int whereas in the case
!defined(BOOST_NO_INTRINSIC_WCHAR_T), the compiler treats wchar_t as an
intrinsic type? And from this we get these template specialization errors? Or
am I way off?

- Regards
Chris


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net