Boost logo

Boost :

From: Reid Sweatman (reids_at_[hidden])
Date: 1999-07-13 14:16:18


Looks good to me, although I suspect there are more things not supported by
VC++ in any version than just member templates. Just have a look at the MS
section in SGI's STL config header (BTW, do you have to explicitly include
that header somewhere, or is it implicitly included by the other headers? I
can find no docs that mention it, and the code is Byzantine, to say the
least).

In that vein, can anyone here explain exactly *what* you do to work around a
compiler (like VC++) that doesn't support pointer operators on iterators? I
get inconsistent behavior from SGI STL, in that I can't explicitly reference
the innards of a compound object given an iterator to it, but the [ ]
operator works just fine, although internally it's implemented with an
iterator pointer (this is with the hash_map class, but it would probably
come up with *any* iterator object).

> -----Original Message-----
> From: Beman Dawes [mailto:beman_at_[hidden]]
> Sent: Tuesday, July 13, 1999 5:41 AM
> To: Boost.org mailing list
> Subject: [boost] config.h[pp]
>
>
> If this was a perfect world, or a standards committee, I wouldn't
> have to be writing this message. But in the real world, where
> compilers don't all conform to standards, we need a way to specify
> compiler configuration information.
>
> While few like doing so, the most practical way of coping with small
> platform dependencies is via macros. Both program maintenance and
> porting costs are minimized by defining the macros in a single
> configuration file.
>
> For example, boost/smart_ptr.h uses member templates if available,
> controlled by the definition or lack of a macro
> BOOST_NMEMBER_TEMPLATES. So that most users to not need to even know
> about this possible compiler shortcoming, smart_ptr.h should #include
> <boost/config.h> (or whatever name).
>
> Here is a first cut at config.h. Comments appreciated.
>
> --Beman
>
> --------
>
> // Boost configuration header file
> -----------------------------------------//
>
> // (C) Copyright Boost.org 1999. Permission to copy, use, modify,
> sell and
> // distribute this software is granted provided this copyright
> notice appears
> // in all copies. This software is provided "as is" without express
> or implied
> // warranty, and with no claim as to its suitability for any
> purpose.
>
> // See http://www.boost.org for most recent version including
> documentation.
>
> // This header is used to pass configuration information to other
> boost files,
> // to allow them to cope with platform dependencies such as compiler
> // shortcomings.
> //
> // Centralized configuration reduces the number of files which must
> be modified
> // when porting libraries to new platforms, or when compilers are
> updated.
> //
> #ifndef BOOST_CONFIG_H
> #define BOOST_CONFIG_H
>
> // Flag macros should identify the absence of C++ Standard
> conformance rather
> // than its presence. This ensures that standard conforming
> compilers do not
> // require a lot of configuration flag macros. It places the burden
> where it
> // should be, on non-conforming compilers. It means, hopefully,
> that in the
> // future less rather than more conformance flags will have to be
> defined.
>
> // Flag Macros
> -------------------------------------------------------------//
> //
> // BOOST_NMEMBER_TEMPLATES: define if compiler doesn't support
> member templates
>
> // Compilers are listed in alphabetic order
> --------------------------------//
>
> // Microsoft (excluding Intel/EDG front end)
> -------------------------------//
>
> # if defined( _MSC_VER ) && (!defined( __ICL )
> # if _MSC_VER <= 1200 // 1200 == VC++ 6.0
> # define BOOST_NMEMBER_TEMPLATES
> # endif
> # endif // Microsoft (excluding Intel/EDG frontend)
>
> #endif // BOOST_CONFIG_H
>
>
> --------------------------------------------------------------
> ----------
> Get in on the new revolution. The only democratic web community.
> Free email. Free webspace at FortuneCity.com.
> http://clickhere.egroups.com/click/365
>
>
>
> eGroups.com home: http://www.egroups.com/group/boost
> http://www.egroups.com - Simplifying group communications
>
>
>
>

------------------------------------------------------------------------

eGroups.com home: http://www.egroups.com/group/boost
http://www.egroups.com - Simplifying group communications


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk