Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Boost.MultiIndex Compiler specifics



Boost.MultiIndex has been tried in different compilers, with various degrees of success. We list the limitations encountered, along with suitable workarounds when available. Up to date information on compatibility of Boost.MultiIndex with several compilers can be found at the Boost Compiler Status Summary. Take into account, however, that between releases of Boost the results from these automatic tests can reflect spurious errors due to work in progress, and may not serve as an accurate indication of which compilers are actually supported.

Contents

Borland C++ Builder 6.4

Currently, Boost.MultiIndex cannot be used with BCB 6.4. The number of problems encountered during the tests makes it unlikely that future versions of the library can be made to work under this compiler.

Comeau C/C++ 4.3.3 for Windows (VC++ 7.0/7.1 backend)

No problems have been detected with this compiler. The library fails to compile, however, when Microsoft Visual C++ 6.0 is used as the backend.

Compaq C++ 6.5-041 for Tru64 UNIX

No problems have been detected with this compiler.

GNU GCC 3.2 and later

No problems have been detected with several versions of this compiler starting from 3.2. The following versions have been explicitly tested:

Boost.MultiIndex does not work with versions 3.1 and prior of GCC.

GNU GCC for Tru64 UNIX

On this platform, GCC is not able to handle debug symbol names whose length exceeds 32,768 bytes, resulting in the error mips-tfile, ... string too big. You may encounter this issue with heavily templatized code like Boost.MultiIndex, which typically produces long symbol names. The problem can be overcome by omitting the compiler option -g (generate debugging information.) Alternatively, you can restrict the maximum number of elements accepted by indexed_by, tag and composite_key by globally setting the values of the macros

This operation results in a modest reduction of the lengths of symbol names.

IBM VisualAge C++ V6.0 for AIX

member not supported, replace with member_offset or use the cross-platform macro BOOST_MULTI_INDEX_MEMBER. The compiler emits warnings about the use of offsetof with non-POD types: these warnings can be suppressed by setting the compiler option -qsuppress=1540-1281, or, alternatively, by inserting the following preprocessor directive:

#pragma info(nolan)

This latter pragma, however, may also eliminate other warnings not related to the use of offsetof.

Intel C++ Compiler for Linux 7.1/8.0/8.1

No problems have been detected with these compilers.

Intel C++ Compiler for Windows 32-bit 7.0/7.1

member not supported, replace with member_offset or use the cross-platform macro BOOST_MULTI_INDEX_MEMBER.


Altough Koenig lookup seems to be officially supported by this compiler, some issues have arisen seemingly due to bugs related to this facility. In these cases you might need to explicitly qualify global names with ::boost::multi_index.

Intel C++ Compiler for Windows 32-bit 7.1 + STLport 4.5.3

Boost.MultiIndex works for this configuration. The same limitations apply as in Intel C++ 7.1 with its original Dinkumware standard library. STLport 4.6.2 has also been confirmed to work correctly.

Intel C++ Compiler for Windows 32-bit 8.0/8.1

No problems have been detected with these compilers.

Metrowerks CodeWarrior 8.3/9.2/9.3

Boost.MultiIndex works correctly with these versions of the compiler, under the two operating systems tested: Mac OS and Windows.

Microsoft Visual C++ 6.0 Service Pack 5

member not supported, replace with member_offset or use the cross-platform macro BOOST_MULTI_INDEX_MEMBER.

const_mem_fun not supported, replace with const_mem_fun_explicit or use the cross-platform macro BOOST_MULTI_INDEX_CONST_MEM_FUN.

mem_fun is not supported, replace with mem_fun_explicit or use the cross-platform macro BOOST_MULTI_INDEX_MEM_FUN.


No support for index retrieval and projection nested types and member functions:

You can use instead their global equivalents. Also, this compiler does not implement Koenig lookup, so you might need to explicitly qualify these global names with ::boost::multi_index.


The lack of partial template specialization support in MSVC++ 6.0 results in some inconveniences when using composite_key that can be remedied as explained in "composite_key in compilers without partial template specialization" on the advanced topics section.


MSVC++ 6.0 presents serious limitations for the maximum length of symbol names generated by the compiler, which might result in the linker error LNK1179: invalid or corrupt file: duplicate comdat comdat. To overcome this problem, you can restrict the maximum number of elements accepted by indexed_by, tag and composite_key by globally setting the values of the macros

This operation results in a modest reduction of the lengths of symbol names.


Under some circumstances, the compiler emits the error C2587: '_U' : illegal use of local variable as default parameter, inside the MSVC internal header <xlocnum>. This problem is a recurrent bug of the compiler, and has been reported in other unrelated libraries, like the Boost Graph Library, Boost.MultiArray, Boost.Regex, CGAL and MySQL++. The error is triggered, though not in a systematic manner, by the use of multi_index_container iterator constructor. Two workarounds exist: the first consists of avoiding this constructor and replacing code like:

multi_index_container<...> s(c.begin(),c.end());

with equivalent operations:

multi_index_container<...> s;
s.insert(c.begin(),c.end());

The second workaround has not been confirmed by the author, but it is given on the Internet in connection with this error appearing in other libraries. Replace line 84 of <xlocnum>

 #define _VIRTUAL	virtual

with the following:

 #define _VIRTUAL

Warning: it is not known whether this replacement can result in unexpected side effects in code implicitly using <xlocnum>.


In general, the extensive use of templates by Boost.MultiIndex puts this compiler under severe stress, so that several internal limitations may be reached. The following measures can help alleviate these problems:

Microsoft Visual C++ 6.0 Service Pack 5 + STLport 4.5.3

Boost.MultiIndex works for this configuration. The same limitations apply as in MSVC++ 6.0 with its original Dinkumware standard library. STLport 4.6.2 has also been confirmed to work correctly.

Microsoft Visual C++ 7.0

member not supported, replace with member_offset or use the cross-platform macro BOOST_MULTI_INDEX_MEMBER.


No support for index retrieval and projection nested types and member functions:

You can use instead their global equivalents. Also, this compiler does not implement Koenig lookup, so you might need to explicitly qualify these global names with ::boost::multi_index.


The lack of partial template specialization support in MSVC++ 7.0 results in some inconveniences when using composite_key that can be remedied as explained in "composite_key in compilers without partial template specialization" on the advanced topics section.

Microsoft Visual C++ 7.1

Problems have been reported when compiling the library with the /Gm option (Enable Minimal Rebuild.) Seemingly, this is due to an internal defect of the compiler (see for instance this mention of a similar issue in the Boost Users mailing list.) If /Gm is turned off, Boost.MultiIndex compiles and runs without further problems.

Microsoft Visual C++ 8.0

No problems have been detected with this compiler. The Beta 1 version of this product was used for the testing.




Revised October 18th 2004

© Copyright 2003-2004 Joaquín M López Muñoz. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)