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.
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.
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.
No problems have been detected with this compiler.
No problems have been detected with several versions of this compiler starting from 3.2. The following versions have been explicitly tested:
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
.
No problems have been detected with these compilers.
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
.
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.
No problems have been detected with this compiler.
Boost.MultiIndex works correctly with these versions of the compiler, under the two operating systems tested: Mac OS and Windows.
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:
nth_index
,index
,nth_index_iterator
,nth_index_const_iterator
,index_iterator
,index_const_iterator
,get
,project
.::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
BOOST_MULTI_INDEX_LIMIT_INDEXED_BY_SIZE
(default in MSVC++ 6.0: 5),BOOST_MULTI_INDEX_LIMIT_TAG_SIZE
(default in MSVC++ 6.0: 3),BOOST_MULTI_INDEX_LIMIT_COMPOSITE_KEY_SIZE
(default in MSVC++ 6.0: 5).
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:
/Zm
(Specify Memory Allocation Limit)
to increase the amount of memory available for compilation. Usual values for
this option range from 300 to 800./ZI
(Program Database for
Edit and Continue) to a less demanding type of debugging information
(/Zi
, /Z7
or /Zd
.)C1055
: compiler limit : out of keys
, try
disabling the option /Gm
(Enable Minimal Rebuild.) In these
cases, it is also beneficial to split the project into smaller
subprojects.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.
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:
nth_index
,index
,nth_index_iterator
,nth_index_const_iterator
,index_iterator
,index_const_iterator
,get
,project
.::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.
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.
No problems have been detected with this compiler. The Beta 1 version of this product was used for the testing.
Revised September 10th 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)