Boost logo

Boost :

From: Fabrice Truillot (fte_at_[hidden])
Date: 2000-07-06 07:06:08


on 5.7.2000 21:59, Beman Dawes at beman_at_[hidden] wrote:

> The output of the regression test compilations is posted at
> http://www.egroups.com/files/boost/Members+Only/compile_log.txt. If anyone
> has ideas as to how to clear any of the errors, please let us know!

I'm using Metrowerks CodeWarrior 5.3 (Macintosh) and Apple MrC. And I've
found what's wrong with the file function_test.cpp.

CodeWarrior does'nt differentiate theses two argument types :
    S (T::*f)(A)
    S (T::*f)(A) const

CW issue a "illegal template argument(s)" error when I try to compile this
code :

template<class S, class T, class A>
inline mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A))
{
    return mem_fun1_ref_t<S,T,A>(f);
}

template<class S, class T, class A>
inline const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const)
{
    return const_mem_fun1_ref_t<S,T,A>(f);
}

class Person
{
    public: bool isFred () const ();
}

void main ()
{
    boost::mem_fun_ref(&Person::is_fred);
}

And this code works fine :

template<class S, class T, class A>
inline mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A))
{
    return mem_fun1_ref_t<S,T,A>(f);
}

/*
template<class S, class T, class A>
inline const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const)
{
    return const_mem_fun1_ref_t<S,T,A>(f);
}
*/

class Person
{
    public: bool isFred () const ();
}

void main ()
{
    boost::mem_fun_ref(&Person::is_fred);
}

Possible solution :

add in config.hpp :

#if defined (__MWERKS__)
#define BOOST_NO_POINTER_TO_MEMBER_CONST
#endif

and...

#if !defined (BOOST_NO_POINTER_TO_MEMBER_CONST)
template<class S, class T, class A>
inline const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const)
{
    return const_mem_fun1_ref_t<S,T,A>(f);
}
#endif

Modified config.hpp and functionnal.hpp in attachment.

Bye,

Fab'
________________________________________________________________________


// ------------------------------------------------------------------------------
// Boost functional.hpp header file
// ------------------------------------------------------------------------------
// Copyright (c) 2000
// Cadenza New Zealand Ltd
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without
// fee, provided that the above copyright notice appears in all copies
// and that both the copyright notice and this permission notice
// appear in supporting documentation. Cadenza New Zealand Ltd makes
// no representations about the suitability of this software for any
// purpose. It is provided "as is" without express or implied
// warranty.
// ------------------------------------------------------------------------------
// $Id: functional.hpp 1.3 2000/06/26 09:44:54 mark Exp $
// ------------------------------------------------------------------------------
// $Log: functional.hpp $
// Revision 1.3 2000/06/26 09:44:54 mark
// Updated following feedback from Jens Maurer.
//
// Revision 1.2 2000/05/17 08:36:30 mark
// Fixed problems with function object traits thanks to ideas
// from John Maddock.
//
// Revision 1.1 2000/05/07 08:26:51 mark
// Initial revision
// ------------------------------------------------------------------------------

#ifndef BOOST_FUNCTIONAL_HPP
#define BOOST_FUNCTIONAL_HPP

#include <boost/config.hpp>
#include <boost/call_traits.hpp>
#include <functional>

namespace boost
{
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
    // --------------------------------------------------------------------------
    // The following traits classes allow us to avoid the need for ptr_fun
    // because the types of arguments and the result of a function can be
    // deduced.
    //
    // In addition to the standard types defined in unary_function and
    // binary_function, we add
    //
    // - function_type, the type of the function or function object itself.
    //
    // - param_type, the type that should be used for passing the function or
    // function object as an argument.
    // --------------------------------------------------------------------------
    namespace detail
    {
        template <class Operation>
        struct unary_traits_imp;
        
        template <class Operation>
        struct unary_traits_imp<Operation*>
        {
            typedef Operation function_type;
            typedef const function_type & param_type;
            typedef typename Operation::result_type result_type;
            typedef typename Operation::argument_type argument_type;
        };

        template <class R, class A>
        struct unary_traits_imp<R(*)(A)>
        {
            typedef R (*function_type)(A);
            typedef R (*param_type)(A);
            typedef R result_type;
            typedef A argument_type;
        };

        template <class Operation>
        struct binary_traits_imp;

        template <class Operation>
        struct binary_traits_imp<Operation*>
        {
            typedef Operation function_type;
            typedef const function_type & param_type;
            typedef typename Operation::result_type result_type;
            typedef typename Operation::first_argument_type first_argument_type;
            typedef typename Operation::second_argument_type second_argument_type;
        };
        
        template <class R, class A1, class A2>
        struct binary_traits_imp<R(*)(A1,A2)>
        {
            typedef R (*function_type)(A1,A2);
            typedef R (*param_type)(A1,A2);
            typedef R result_type;
            typedef A1 first_argument_type;
            typedef A2 second_argument_type;
        };
    } // namespace detail
    
    template <class Operation>
    struct unary_traits
    {
        typedef typename detail::unary_traits_imp<Operation*>::function_type function_type;
        typedef typename detail::unary_traits_imp<Operation*>::param_type param_type;
        typedef typename detail::unary_traits_imp<Operation*>::result_type result_type;
        typedef typename detail::unary_traits_imp<Operation*>::argument_type argument_type;
    };

    template <class R, class A>
    struct unary_traits<R(*)(A)>
    {
        typedef R (*function_type)(A);
        typedef R (*param_type)(A);
        typedef R result_type;
        typedef A argument_type;
    };

    template <class Operation>
    struct binary_traits
    {
        typedef typename detail::binary_traits_imp<Operation*>::function_type function_type;
        typedef typename detail::binary_traits_imp<Operation*>::param_type param_type;
        typedef typename detail::binary_traits_imp<Operation*>::result_type result_type;
        typedef typename detail::binary_traits_imp<Operation*>::first_argument_type first_argument_type;
        typedef typename detail::binary_traits_imp<Operation*>::second_argument_type second_argument_type;
    };
    
    template <class R, class A1, class A2>
    struct binary_traits<R(*)(A1,A2)>
    {
        typedef R (*function_type)(A1,A2);
        typedef R (*param_type)(A1,A2);
        typedef R result_type;
        typedef A1 first_argument_type;
        typedef A2 second_argument_type;
    };
#else
    // --------------------------------------------------------------------------
    // If we have no partial specialisation available, decay to a situation
    // that is no worse than in the Standard, i.e., ptr_fun will be required.
    // --------------------------------------------------------------------------

    template <class Operation>
    struct unary_traits
    {
        typedef Operation function_type;
        typedef const Operation& param_type;
        typedef typename Operation::result_type result_type;
        typedef typename Operation::argument_type argument_type;
    };
    
    template <class Operation>
    struct binary_traits
    {
        typedef Operation function_type;
        typedef const Operation & param_type;
        typedef typename Operation::result_type result_type;
        typedef typename Operation::first_argument_type first_argument_type;
        typedef typename Operation::second_argument_type second_argument_type;
    };
#endif
    
    // --------------------------------------------------------------------------
    // unary_negate, not1
    // --------------------------------------------------------------------------
    template <class Predicate>
    class unary_negate
        : public std::unary_function<typename unary_traits<Predicate>::argument_type,bool>
    {
      public:
        explicit unary_negate(typename unary_traits<Predicate>::param_type x)
            :
            pred(x)
        {}
        bool operator()(typename call_traits<typename unary_traits<Predicate>::argument_type>::param_type x) const
        {
            return !pred(x);
        }
      private:
        typename unary_traits<Predicate>::function_type pred;
    };

    template <class Predicate>
    unary_negate<Predicate> not1(const Predicate &pred)
    {
        // The cast is to placate Borland C++Builder in certain circumstances.
        // I don't think it should be necessary.
        return unary_negate<Predicate>((typename unary_traits<Predicate>::param_type)pred);
    }

    // --------------------------------------------------------------------------
    // binary_negate, not2
    // --------------------------------------------------------------------------
    template <class Predicate>
    class binary_negate
        : public std::binary_function<typename binary_traits<Predicate>::first_argument_type,
                                      typename binary_traits<Predicate>::second_argument_type,
                                      bool>
    {
      public:
        explicit binary_negate(typename binary_traits<Predicate>::param_type x)
            :
            pred(x)
        {}
        bool operator()(typename call_traits<typename binary_traits<Predicate>::first_argument_type>::param_type x,
                        typename call_traits<typename binary_traits<Predicate>::second_argument_type>::param_type y) const
        {
            return !pred(x,y);
        }
      private:
        typename binary_traits<Predicate>::function_type pred;
    };

    template <class Predicate>
    binary_negate<Predicate> not2(const Predicate &pred)
    {
        // The cast is to placate Borland C++Builder in certain circumstances.
        // I don't think it should be necessary.
        return binary_negate<Predicate>((typename binary_traits<Predicate>::param_type)pred);
    }
        
    // --------------------------------------------------------------------------
    // binder1st, bind1st
    // --------------------------------------------------------------------------
    template <class Operation>
    class binder1st
        : public std::unary_function<typename binary_traits<Operation>::second_argument_type,
                                     typename binary_traits<Operation>::result_type>
    {
      public:
        binder1st(typename binary_traits<Operation>::param_type x,
                  typename call_traits<typename binary_traits<Operation>::first_argument_type>::param_type y)
            :
            op(x), value(y)
        {}
        
        typename binary_traits<Operation>::result_type
        operator()(typename call_traits<typename binary_traits<Operation>::second_argument_type>::param_type x) const
        {
            return op(value, x);
        }
        
      protected:
        typename binary_traits<Operation>::function_type op;
        typename binary_traits<Operation>::first_argument_type value;
    };

    template <class Operation>
    inline binder1st<Operation> bind1st(const Operation &op,
                                        typename call_traits<
                                                    typename binary_traits<Operation>::first_argument_type
>::param_type x)
    {
        // The cast is to placate Borland C++Builder in certain circumstances.
        // I don't think it should be necessary.
        return binder1st<Operation>((typename binary_traits<Operation>::param_type)op, x);
    }

    // --------------------------------------------------------------------------
    // binder2nd, bind2nd
    // --------------------------------------------------------------------------
    template <class Operation>
    class binder2nd
        : public std::unary_function<typename binary_traits<Operation>::first_argument_type,
                                     typename binary_traits<Operation>::result_type>
    {
      public:
        binder2nd(typename binary_traits<Operation>::param_type x,
                  typename call_traits<typename binary_traits<Operation>::second_argument_type>::param_type y)
            :
            op(x), value(y)
        {}
        
        typename binary_traits<Operation>::result_type
        operator()(typename call_traits<typename binary_traits<Operation>::first_argument_type>::param_type x) const
        {
            return op(x, value);
        }
        
      protected:
        typename binary_traits<Operation>::function_type op;
        typename binary_traits<Operation>::second_argument_type value;
    };

    template <class Operation>
    inline binder2nd<Operation> bind2nd(const Operation &op,
                                        typename call_traits<
                                                    typename binary_traits<Operation>::second_argument_type
>::param_type x)
    {
        // The cast is to placate Borland C++Builder in certain circumstances.
        // I don't think it should be necessary.
        return binder2nd<Operation>((typename binary_traits<Operation>::param_type)op, x);
    }

    // --------------------------------------------------------------------------
    // mem_fun, etc
    // --------------------------------------------------------------------------
    template <class S, class T>
    class mem_fun_t : public std::unary_function<T*, S>
    {
      public:
        explicit mem_fun_t(S (T::*p)())
            :
            ptr(p)
        {}
        S operator()(T* p) const
        {
            return (p->*ptr)();
        }
      private:
        S (T::*ptr)();
    };

    template <class S, class T, class A>
    class mem_fun1_t : public std::binary_function<T*, A, S>
    {
      public:
        explicit mem_fun1_t(S (T::*p)(A))
            :
            ptr(p)
        {}
        S operator()(T* p, typename call_traits<A>::param_type x) const
        {
            return (p->*ptr)(x);
        }
      private:
        S (T::*ptr)(A);
    };

    template <class S, class T>
    class const_mem_fun_t : public std::unary_function<const T*, S>
    {
      public:
        explicit const_mem_fun_t(S (T::*p)() const)
            :
            ptr(p)
        {}
        S operator()(const T* p) const
        {
            return (p->*ptr)();
        }
      private:
        S (T::*ptr)() const;
    };

    template <class S, class T, class A>
    class const_mem_fun1_t : public std::binary_function<const T*, A, S>
    {
      public:
        explicit const_mem_fun1_t(S (T::*p)(A) const)
            :
            ptr(p)
        {}
        S operator()(const T* p, typename call_traits<A>::param_type x) const
        {
            return (p->*ptr)(x);
        }
      private:
        S (T::*ptr)(A) const;
    };
    
    template<class S, class T>
    inline mem_fun_t<S,T> mem_fun(S (T::*f)())
    {
        return mem_fun_t<S,T>(f);
    }
    
    template<class S, class T, class A>
    inline mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A))
    {
        return mem_fun1_t<S,T,A>(f);
    }

#ifndef BOOST_NO_POINTER_TO_MEMBER_CONST
    template<class S, class T>
    inline const_mem_fun_t<S,T> mem_fun(S (T::*f)() const)
    {
        return const_mem_fun_t<S,T>(f);
    }
    
    template<class S, class T, class A>
    inline const_mem_fun1_t<S,T,A> mem_fun(S (T::*f)(A) const)
    {
        return const_mem_fun1_t<S,T,A>(f);
    }
#endif /*BOOST_NO_POINTER_TO_MEMBER_CONST*/

    // --------------------------------------------------------------------------
    // mem_fun_ref, etc
    // --------------------------------------------------------------------------
    template <class S, class T>
    class mem_fun_ref_t : public std::unary_function<T&, S>
    {
      public:
        explicit mem_fun_ref_t(S (T::*p)())
            :
            ptr(p)
        {}
        S operator()(T& p) const
        {
            return (p.*ptr)();
        }
      private:
        S (T::*ptr)();
    };

    template <class S, class T, class A>
    class mem_fun1_ref_t : public std::binary_function<T&, A, S>
    {
      public:
        explicit mem_fun1_ref_t(S (T::*p)(A))
            :
            ptr(p)
        {}
        S operator()(T& p, typename call_traits<A>::param_type x) const
        {
            return (p.*ptr)(x);
        }
      private:
        S (T::*ptr)(A);
    };
    
    template <class S, class T>
    class const_mem_fun_ref_t : public std::unary_function<const T&, S>
    {
      public:
        explicit const_mem_fun_ref_t(S (T::*p)() const)
            :
            ptr(p)
        {}
        
        S operator()(const T &p) const
        {
            return (p.*ptr)();
        }
      private:
        S (T::*ptr)() const;
    };

    template <class S, class T, class A>
    class const_mem_fun1_ref_t : public std::binary_function<const T&, A, S>
    {
      public:
        explicit const_mem_fun1_ref_t(S (T::*p)(A) const)
            :
            ptr(p)
        {}

        S operator()(const T& p, typename call_traits<A>::param_type x) const
        {
            return (p.*ptr)(x);
        }
      private:
        S (T::*ptr)(A) const;
    };
    
    template<class S, class T>
    inline mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)())
    {
        return mem_fun_ref_t<S,T>(f);
    }

    template<class S, class T, class A>
    inline mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A))
    {
        return mem_fun1_ref_t<S,T,A>(f);
    }

#ifndef BOOST_NO_POINTER_TO_MEMBER_CONST
    template<class S, class T>
    inline const_mem_fun_ref_t<S,T> mem_fun_ref(S (T::*f)() const)
    {
        return const_mem_fun_ref_t<S,T>(f);
    }

    template<class S, class T, class A>
    inline const_mem_fun1_ref_t<S,T,A> mem_fun_ref(S (T::*f)(A) const)
    {
        return const_mem_fun1_ref_t<S,T,A>(f);
    }
#endif /*BOOST_NO_POINTER_TO_MEMBER_CONST*/

    // --------------------------------------------------------------------------
    // ptr_fun
    // --------------------------------------------------------------------------
    template <class Arg, class Result>
    class pointer_to_unary_function : public std::unary_function<Arg,Result>
    {
      public:
        explicit pointer_to_unary_function(Result (*f)(Arg))
            :
            func(f)
        {}

        Result operator()(typename call_traits<Arg>::param_type x) const
        {
            return func(x);
        }
        
      private:
        Result (*func)(Arg);
    };

    template <class Arg, class Result>
    inline pointer_to_unary_function<Arg,Result> ptr_fun(Result (*f)(Arg))
    {
        return pointer_to_unary_function<Arg,Result>(f);
    }

    template <class Arg1, class Arg2, class Result>
    class pointer_to_binary_function : public std::binary_function<Arg1,Arg2,Result>
    {
      public:
        explicit pointer_to_binary_function(Result (*f)(Arg1, Arg2))
            :
            func(f)
        {}
        
        Result operator()(typename call_traits<Arg1>::param_type x, typename call_traits<Arg2>::param_type y) const
        {
            return func(x,y);
        }
        
      private:
        Result (*func)(Arg1, Arg2);
    };

    template <class Arg1, class Arg2, class Result>
    inline pointer_to_binary_function<Arg1,Arg2,Result> ptr_fun(Result (*f)(Arg1, Arg2))
    {
        return pointer_to_binary_function<Arg1,Arg2,Result>(f);
    }
} // namespace boost

#endif

// Boost config.hpp 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.

// Boost config.hpp policy and rationale documentation has been moved to
// http://www.boost.org/libs/config

// Revision History (excluding minor changes for specific compilers)
// 26 Jun 00 BOOST_NO_STD_ITERATOR, BOOST_MSVC_STD_ITERATOR,
// BOOST_NO_ITERATOR_TRAITS, BOOST_NO_USING_TEMPLATE,
// added (Jeremy Siek)
// 20 Jun 00 BOOST_MSVC added (Aleksey Gurtovoy)
// 14 Jun 00 BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS (Jens M.)
// 22 Mar 00 BOOST_MSVC6_MEMBER_TEMPLATES added (Dave Abrahams)
// 18 Feb 00 BOOST_NO_INCLASS_MEMBER_INITIALIZATION added (Jens Maurer)
// 26 Jan 00 Borland compiler support added (John Maddock)
// 26 Jan 00 Sun compiler support added (Jörg Schaible)
// 30 Dec 99 BOOST_NMEMBER_TEMPLATES compatibility moved here from
// smart_ptr.hpp. (Dave Abrahams)
// 15 Nov 99 BOOST_NO_OPERATORS_IN_NAMESPACE,
// BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION added (Beman Dawes)
// 11 Oct 99 BOOST_NO_STDC_NAMESPACE refined; <cstddef> supplied
// 29 Sep 99 BOOST_NO_STDC_NAMESPACE added (Ed Brey)
// 24 Sep 99 BOOST_DECL added (Ed Brey)
// 10 Aug 99 Endedness flags added, GNU CC support added
// 22 Jul 99 Initial version
 

#ifndef BOOST_CONFIG_HPP
#define BOOST_CONFIG_HPP

// Conformance Flag Macros -------------------------------------------------//
//
// Conformance 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. In the future,
// hopefully, less rather than more conformance flags will have to be defined.

// BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS: Template value
// parameters cannot have a dependent type, for example
// "template<class T, typename T::type value> class X { ... };"

// BOOST_NO_INCLASS_MEMBER_INITIALIZER: Compiler violates std::9.4.2/4.

// BOOST_NO_ITERATOR_TRAITS: The compiler does not provide a standard
// compliant implementation of std::iterator_traits. Note that
// the compiler may still have a non-standard implementation.

// BOOST_NO_MEMBER_TEMPLATES: Member template functions not fully supported.
// Also see BOOST_MSVC6_MEMBER_TEMPLATES in the Compiler Control section below.

// BOOST_NO_MEMBER_TEMPLATE_FRIENDS: Member template friend syntax
// ("template<class P> friend class frd;") described in the C++ Standard,
// 14.5.3, not supported.

// BOOST_NO_OPERATORS_IN_NAMESPACE: Compiler requires inherited operator
// friend functions to be defined at namespace scope, then using'ed to boost.
// Probably GCC specific. See boost/operators.hpp for example.

// BOOST_NO_STD_ITERATOR: The C++ implementation fails to provide the
// std::iterator class.

// BOOST_NO_STDC_NAMESPACE: The contents of C++ standard headers for C library
// functions (the <c...> headers) have not been placed in namespace std.
// Because the use of std::size_t is so common, a specific workaround for
// <cstddef> (and thus std::size_t) is provided in this header (see below).
// For other <c...> headers, a workaround must be provided in the boost header:
//
// #include <cstdlib> // for abs
// #ifdef BOOST_NO_STDC_NAMESPACE
// namespace std { using ::abs; }
// #endif

// BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION. Class template partial
// specialization (14.5.4 [temp.class.spec]) not supported.

// BOOST_NO_USING_TEMPLATE: This needs some docs!

// Compiler Control or Information Macros ----------------------------------//
//
// Compilers often supply features outside of the C++ Standard which need to be
// controlled or detected. As usual, reasonable default behavior should occur
// if any of these macros are not defined.

// BOOST_DECL: Certain compilers for Microsoft operating systems require
// non-standard class and function decoration if dynamic load library linking
// is desired. BOOST_DECL supplies that decoration, defaulting to a nul string
// so that it is harmless when not required. Boost does not encourage the use
// of BOOST_DECL - it is non-standard and to be avoided if practical to do so.

// BOOST_DECL_EXPORTS: User defined, BOOST_DECL_EXPORTS causes BOOST_DECL to
// be defined as __declspec(dllexport) rather than __declspec(dllimport).

// BOOST_MSVC6_MEMBER_TEMPLATES: Microsoft Visual C++ 6.0 has enough member
// template idiosyncrasies (being polite) that BOOST_NO_MEMBER_TEMPLATES is
// defined for this compiler. BOOST_MSVC6_MEMBER_TEMPLATES is defined to allow
// compiler specific workarounds.

// BOOST_MSVC: defined as _MSC_VER for the Microsoft compiler only. In general,
// boost headers should test for a specific conformance flag macro (for
// example, BOOST_NO_MEMBER_TEMPLATE_FRIENDS) rather than a specific compiler.
// VC++ is a special case, however, since many libraries try to support it yet
// it has so many conformance issues that sometimes it is just easier to test
// for it directly. On the other hand, the obvious way to do this doesn't work,
// as many non-Microsoft compilers define _MSC_VER. Thus BOOST_MSVC.

// BOOST_MSVC_STD_ITERATOR: Microsoft's broken version of std::iterator
// is being used.

// BOOST_SYSTEM_HAS_STDINT_H: There are no 1998 C++ Standard headers <stdint.h>
// or <cstdint>, although the 1999 C Standard does include <stdint.h>.
// If <stdint.h> is present, <boost/stdint.h> can make good use of it,
// so a flag is supplied (signalling presence; thus the default is not
// present, conforming to the current C++ standard).

// Compilers are listed in alphabetic order (except VC++ last - see below)---//

// GNU CC (also known as GCC and G++) --------------------------------------//

# if defined __GNUC__
# if __GNUC__ == 2 && __GNUC_MINOR__ <= 95
# include <iterator> // not sure this is the right way to do this -JGS
# if !defined(_CXXRT_STD) && !defined(__SGI_STL) // need to ask Dietmar about this -JGS
# define BOOST_NO_STD_ITERATOR
# endif
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
# define BOOST_NO_OPERATORS_IN_NAMESPACE
# endif
# if __GNUC__ == 2 && __GNUC_MINOR__ <= 8
# define BOOST_NO_MEMBER_TEMPLATES
# endif

// Borland ------------------------------------------------------------------//

#elif defined __BORLANDC__
# if __BORLANDC__ <= 0x0550
// Borland C++ Builder 4 and 5:
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
# if __BORLANDC__ == 0x0550
// Borland C++ Builder 5, command-line compiler 5.5:
# define BOOST_NO_OPERATORS_IN_NAMESPACE
# define BOOST_NO_USING_TEMPLATE
# endif
# endif
# if defined BOOST_DECL_EXPORTS
# define BOOST_DECL __declspec(dllexport)
# else
# define BOOST_DECL __declspec(dllimport)
# endif
# if __BORLANDC__ == 0x550
# define BOOST_NO_OPERATORS_IN_NAMESPACE
# endif

// Intel -------------------------------------------------------------------//

# elif defined __ICL
# include <iterator> // not sure this is the right way to do this -JGS
# if __SGI_STL_PORT >= 0x400 || __SGI_STL_PORT >= 0x321 && defined(__STL_USE_NAMESPACES)
        // a perfectly good implementation of std::iterator is supplied
# elif defined(__SGI_STL_ITERATOR)
# define BOOST_NO_STD_ITERATOR // No std::iterator in this case
# else // assume using dinkumware's STL that comes with VC++ 6.0
# define BOOST_MSVC_STD_ITERATOR
# define BOOST_NO_STD_ITERATOR_TRAITS
# define BOOST_NO_STDC_NAMESPACE
# endif


// Metrowerks CodeWarrior --------------------------------------------------//

# elif defined __MWERKS__
# if __MWERKS__ <= 0x2301
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
# define BOOST_NO_POINTER_TO_MEMBER_CONST
# endif
# if __MWERKS__ >= 0x2300
# define BOOST_SYSTEM_HAS_STDINT_H
# endif
# if defined BOOST_DECL_EXPORTS
# define BOOST_DECL __declspec(dllexport)
# else
# define BOOST_DECL __declspec(dllimport)
# endif

// Sun Workshop Compiler C++ ------------------------------------------------//

# elif defined __SUNPRO_CC
# if __SUNPRO_CC <= 0x500
# define BOOST_NO_MEMBER_TEMPLATES
# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# endif

// Microsoft Visual C++ (excluding Intel/EDG front end) --------------------//
//
// Must remain the last #elif since some other vendors (Metrowerks, for
// example) also #define _MSC_VER

# elif defined _MSC_VER
# define BOOST_MSVC _MSC_VER
# if _MSC_VER <= 1200 // 1200 == VC++ 6.0
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION

// VC++ 6.0 has member templates but they have numerous problems including
// cases of silent failure, so for safety we define:
# define BOOST_NO_MEMBER_TEMPLATES
// For VC++ experts wishing to attempt workarounds, we define:
# define BOOST_MSVC6_MEMBER_TEMPLATES

# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS

# include <iterator> // not sure this is the right way to do this -JGS
# if __SGI_STL_PORT >= 0x400 || __SGI_STL_PORT >= 0x321 && defined(__STL_USE_NAMESPACES)
        // a perfectly good implementation of std::iterator is supplied
# elif defined(__SGI_STL_ITERATOR)
# define BOOST_NO_STD_ITERATOR // No std::iterator in this case
# else
# define BOOST_MSVC_STD_ITERATOR 1
# endif
# define BOOST_NO_STD_ITERATOR_TRAITS


// Make sure at least one standard library header is included so that library
// implementation detection will work, even if no standard headers have been
// included in front of a boost header. (Ed Brey 5 Jun 00)
# include <cstddef>

// Determine if the standard library implementation is already pulling names
// into std. STLport defines the following if so. (Ed Brey 5 Jun 00)
# ifndef __STL_IMPORT_VENDOR_CSTD
# define BOOST_NO_STDC_NAMESPACE
# endif

# endif

# if defined BOOST_DECL_EXPORTS
# define BOOST_DECL __declspec(dllexport)
# else
# define BOOST_DECL __declspec(dllimport)
# endif

# pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info

# endif // Microsoft (excluding Intel/EDG frontend)

# ifndef BOOST_DECL
# define BOOST_DECL // default for compilers not needing this decoration.
# endif

// end of compiler specific portion ----------------------------------------//

// Check for old name "BOOST_NMEMBER_TEMPLATES" for compatibility -----------//
// Don't use BOOST_NMEMBER_TEMPLATES. It is deprecated and will be removed soon.
#if defined( BOOST_NMEMBER_TEMPLATES ) && !defined( BOOST_NO_MEMBER_TEMPLATES )
  #define BOOST_NO_MEMBER_TEMPLATES
#endif

// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------//
//
// Because std::size_t usage is so common, even in boost headers which do not
// otherwise use the C library, the <cstddef> workaround is included here so
// that ugly workaround code need not appear in many other boost headers.
// NOTE WELL: This is a workaround for non-conforming compilers; <cstddef>
// must still be #included in the usual places so that <cstddef> inclusion
// works as expected with standard conforming compilers. The resulting
// double inclusion of <cstddef> is harmless.

# ifdef BOOST_NO_STDC_NAMESPACE
# include <cstddef>
    namespace std { using ::ptrdiff_t; using ::size_t; }
    // using ::wchar_t; removed to work around old compilers (Ed Brey)
# endif


#endif // BOOST_CONFIG_HPP


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