Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2004-05-16 10:04:45


On May 16, 2004, at 5:09 AM, Gennaro Prota wrote:

> Secondly, a help request. There are some MW errors which I won't be
> able to fix, as I don't have access to that compiler:
>
> http://boost.sourceforge.net/regression-logs/cs-win32_metacomm/output/
> bin-boost-libs-dynamic_bitset-dyn_bitset_unit_tests1-test-cwpro8-
> debug.html

> ### mwcc Compiler:
> # In: ..\boost\dynamic_bitset\dynamic_bitset.hpp
> # From: ..\libs\dynamic_bitset\dyn_bitset_unit_tests1.cpp
> # ----------------------------------------------------------
> # 993: return do_count(m_bits.begin(), num_blocks(),
> Block(0), (mode_to_type<m>*) 0 );
> # Error:
> ^
> # illegal non-type template argument
> # (included from:
> # dynamic_bitset.hpp:17
> # bitset_test.hpp:27
> # dyn_bitset_unit_tests1.cpp:12)

I believe this is a compiler error and the only way I'm aware of to
work around it is to perform this computation:

     const bool no_padding = bits_per_block == CHAR_BIT * sizeof(Block);
     const mode m = table_width >= CHAR_BIT && no_padding
                      ? access_by_bytes : access_by_blocks;

using class static const members instead of function-locale const
variables.

> ### mwcc Compiler:
> # 1419: const ctype<Ch> & fac = BOOST_USE_FACET(ctype<Ch>,
> os.getloc());
> # Error: ^^^^^
> # undefined identifier 'ctype'
> # (included from:
> # dynamic_bitset.hpp:17
> # bitset_test.hpp:27
> # dyn_bitset_unit_tests1.cpp:12)

Looks like <locale> is not getting included.

-Howard


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