Subject: Re: [boost] [locale] Review part 1: headers
From: Artyom (artyomtnk_at_[hidden])
Date: 2011-04-10 00:27:09
> > Give me a name of modern compiler that supports C++03
> > and has sizeof(unsigned)< 4?
> On DSPs it is usually 1 byte and 16 bits, but then it could be argued they
>have bad compilers.
> I wonder if anyone ever tried to run Boost with a TI compiler (they certainly
>claim support for C++
> is "excellent" on their wiki).
- Does ICU compilable for DSP?
- Does standard C++ library of them supports something
beyond C and POSIX locales?
See... Where I need 32 bits I use them, however I need
this enum to have 20 bits and this is
practical not theoretical issue.
So 16 bit platform would be not supported for now.
I'm really try to solve practical issues.
> > size_t is used in boost as it is closest way to use something
> > in C++03 standard that is similar to uintptr_t.
> > That is way C99 and C++03 created uintptr_t.
> > In any case as I told I'll change this for better consistency/
> size_t is a type big enough to hold the size of any object.
> >> 3) I don't know of compilers where those are different, mind saying
> >> which ones exhibit this?
> I would have liked a response to question 3) also.
OpenVMS's C++ compiler from HP, sizeof(size_t)=4 but sizeof(void *)=8
in 64 mode...
And this is real platform, not DSP.
> > As I told above I'll change it to size_t but...
> > You don't want to run boundary analysis on such chunks of text
> > in any case - and if you do it, you are doing something wrong.
> And why is that? Because the algorithm doesn't scale?
> It should be linear, which is good enough. Documenting its complexity would be
No, because when you deal with text there
are real world assumptions you can made - there is no
single chunk of text of size written by man such that >= 4GB...
In any case I suggest to drop it because I'll change it to size_t
> > No, see:
> Hmm, good point.
> You could use a class instead of a typedef to avoid these issues.
No as well.
Read the second bullet in the link above. You can't create std::locale facets
for arbitrary types.
In fact, because GCC's libstd++ does not specializes them for char16_t/char32_t
(library bug) I can't create such facets as I get undefined references.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk