Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2004-05-23 04:33:25


On Sun, 16 May 2004 11:04:45 -0400, Howard Hinnant
<hinnant_at_[hidden]> wrote:

>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;

Sorry for asking again, but I tried CW9.2 evaluation version and it
*doesn't* give errors. Since I'm worried that introducing two new
class templates can trigger warnings/errors with other compilers,
Would it be ok to write e.g.

  const bool no_padding = bits_per_block == CHAR_BIT * sizeof(Block);
  const bool table_is_large_enough = table_width >= CHAR_BIT;

  return do_count(
                  m_bits.begin(), num_blocks(), Block(0),
                  (mode_to_type<
                           (no_padding && table_is_large_enough?)
                           access_by_bytes : access_by_blocks
>*) 0
                 );

?

>
>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.

This one is odd. I see that the command line used for regression
testing includes "-runtime dmd", and our metrowerks config file has

// locale support is disabled when linking with the dynamic runtime
# ifdef _MSL_NO_LOCALE
# define BOOST_NO_STD_LOCALE
# endif

Since I test for BOOST_NO_STD_LOCALE before #including it may well be
that <locale> is not getting included :) But why everything works with
CW 9.2 instead? Can you please confirm that _MSL_NO_LOCALE is defined
for version 8.3 and not for 9.2?

Thanks,

Genny.


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