Boost logo

Boost Users :

From: Darren Cox (darrentcox_at_[hidden])
Date: 2004-03-14 19:51:40


Hi,

I am using version 1.31.0 of the Boost library together with version 2.33 of the Dinkumware STL library, and I get the following compilation error (from VC6 SP5):

c:\temp\boost_1_31_0\boost\config\suffix.hpp(296) : error C2995: 'min' : template function has already been defined
        t:\sxl\include\xutility(582) : see declaration of 'min'
c:\temp\boost_1_31_0\boost\config\suffix.hpp(300) : error C2995: 'max' : template function has already been defined
        t:\sxl\include\xutility(572) : see declaration of 'max'

If I comment out the line that defines BOOST_NO_STD_MIN_MAX in config\stdlib\dinkumware.hpp, as shown in the diff below, then everything works fine.

*** Copy of dinkumware.hpp        Tue Nov 25 20:25:36 2003
--- dinkumware.hpp         Thu Feb 26 04:07:38 2004
***************
*** 56,62 ****
  #  ifndef _CPPLIB_VER
        // Updated Dinkum library defines this, and provides
        // its own min and max definitions.
! #     define BOOST_NO_STD_MIN_MAX
  #     define BOOST_NO_MS_INT64_NUMERIC_LIMITS
  #  endif
  #endif
--- 56,62 ----
  #  ifndef _CPPLIB_VER
        // Updated Dinkum library defines this, and provides
        // its own min and max definitions.
! //#     define BOOST_NO_STD_MIN_MAX
  #     define BOOST_NO_MS_INT64_NUMERIC_LIMITS
  #  endif
  #endif

Note that the only directories in my include path were as follows:

C:\Temp\boost_1_31_0
t:\SXL\include
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE
C:\Program Files\Microsoft Visual Studio\VC98\MFC\INCLUDE
C:\Program Files\Microsoft Visual Studio\VC98\ATL\INCLUDE

Is this a genuine bug? Has anyone else had the same problem?

Cheers,
Darren.



We've 100s of NEW questions! Play Millionaire online to win $$$$. Click here!

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