Wednesday, October 1, 2008

23 new messages in 11 topics - digest

comp.lang.c++
http://groups.google.com/group/comp.lang.c++?hl=en

comp.lang.c++@googlegroups.com

Today's topics:

* STL container question - 9 messages, 6 authors
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/d2af39d060636197?hl=en
* (&vec)== &vec[0]? - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/d77c87f0acfdcd75?hl=en
* templates - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/72aa4d4f4ae0f080?hl=en
* cout vs std::cout - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/4f48acdaa9e16cee?hl=en
* wrapping std::vector<> to track memory usage? - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/03c4b2188e8040c6?hl=en
* CppDoc, please help - 3 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/a605d88081dbaf63?hl=en
* initialization failure - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/e168c87901f12d38?hl=en
* What's the standard say about this code? - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/ba343bcb425e7e31?hl=en
* ===Welcome to comp.lang.c++! Read this first. - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/bcde80859cb37d0f?hl=en
* Wholesale NFL Jerseys Mlb jerseys Nhl hockey jerseys www.ciciaaa.cn sale NFL
Jerseys Mlb jerseys Nhl hockey jerseys www.ciciaaa.cn - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/b62a55fd7dde590a?hl=en
* The need of Unicode types in C++0x - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/56ed90f231762d03?hl=en

==============================================================================
TOPIC: STL container question
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/d2af39d060636197?hl=en
==============================================================================

== 1 of 9 ==
Date: Wed, Oct 1 2008 6:37 am
From: Lars Tetzlaff


Boltar schrieb:
> Hi
>
> I need to store a number of integer values which I will then search on
> later to see if they exist in my container. Can someone tell me which
> container would be quickest for finding these values? I can't use a
> plain C array (unless I make it 2^32 in size!) since I don't know the
> max integer value.
>
> Thanks for any help
>
> B2003

std::set

Lars

== 2 of 9 ==
Date: Wed, Oct 1 2008 6:40 am
From: Jeff Schwab


Boltar wrote:

> I need to store a number of integer values which I will then search on
> later to see if they exist in my container. Can someone tell me which
> container would be quickest for finding these values? I can't use a
> plain C array (unless I make it 2^32 in size!) since I don't know the
> max integer value.

Sorted vector. See Effective STL, Item 23.

For the record, you wouldn't 2^32 integers, just 2^32 bits = 500 MiB.
It's actually not that much RAM, depending on your target system, and
would let you check for integers with O(1) complexity (rather than O(log
N)).

== 3 of 9 ==
Date: Wed, Oct 1 2008 7:09 am
From: Ioannis Vranos


Victor Bazarov wrote:
>
> Store first, then sort, then search (using 'std::binary_search'), you
> could just use 'std::vector'.


For that case, I think std::list is a better option, since the sorting
will be faster,

== 4 of 9 ==
Date: Wed, Oct 1 2008 7:12 am
From: Victor Bazarov


Ioannis Vranos wrote:
> Victor Bazarov wrote:
>>
>> Store first, then sort, then search (using 'std::binary_search'), you
>> could just use 'std::vector'.
>
>
> For that case, I think std::list is a better option, since the sorting
> will be faster,

Do you have any proof of that?

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask

== 5 of 9 ==
Date: Wed, Oct 1 2008 7:23 am
From: Ioannis Vranos


Victor Bazarov wrote:
> Ioannis Vranos wrote:
>> Victor Bazarov wrote:
>>>
>>> Store first, then sort, then search (using 'std::binary_search'), you
>>> could just use 'std::vector'.
>>
>>
>> For that case, I think std::list is a better option, since the sorting
>> will be faster,
>
> Do you have any proof of that?


Lists are implemented using pointers to point to the previous and to the
next elements, so list::sort(), is more efficient by changing pointer
values, while sorting a vector involves copying objects.

== 6 of 9 ==
Date: Wed, Oct 1 2008 7:43 am
From: Juha Nieminen


Ioannis Vranos wrote:
> Lists are implemented using pointers to point to the previous and to the
> next elements, so list::sort(), is more efficient by changing pointer
> values, while sorting a vector involves copying objects.

The original poster talked about storing integer values. I highly
doubt sorting a list of integers will be faster than sorting an array of
integers. In fact, I'm pretty sure of the contrary.

== 7 of 9 ==
Date: Wed, Oct 1 2008 7:44 am
From: Juha Nieminen


Boltar wrote:
> I need to store a number of integer values which I will then search on
> later to see if they exist in my container. Can someone tell me which
> container would be quickest for finding these values? I can't use a
> plain C array (unless I make it 2^32 in size!) since I don't know the
> max integer value.

If memory usage is not an issue, std::set is by far the easiest solution.

(OTOH if the amount of integers can be counted in the millions, then
it may be better to use a sorted vector or whatever.)

== 8 of 9 ==
Date: Wed, Oct 1 2008 9:53 am
From: Rolf Magnus


Ioannis Vranos wrote:

> Victor Bazarov wrote:
>> Ioannis Vranos wrote:
>>> Victor Bazarov wrote:
>>>>
>>>> Store first, then sort, then search (using 'std::binary_search'), you
>>>> could just use 'std::vector'.
>>>
>>>
>>> For that case, I think std::list is a better option, since the sorting
>>> will be faster,
>>
>> Do you have any proof of that?
>
>
> Lists are implemented using pointers to point to the previous and to the
> next elements, so list::sort(), is more efficient by changing pointer
> values, while sorting a vector involves copying objects.

And you really think that doing two pointer exchanges is faster than one
integer exchange?


== 9 of 9 ==
Date: Wed, Oct 1 2008 9:57 am
From: Rolf Magnus


Jeff Schwab wrote:

> Boltar wrote:
>
>> I need to store a number of integer values which I will then search on
>> later to see if they exist in my container. Can someone tell me which
>> container would be quickest for finding these values? I can't use a
>> plain C array (unless I make it 2^32 in size!) since I don't know the
>> max integer value.
>
> Sorted vector. See Effective STL, Item 23.
>
> For the record, you wouldn't 2^32 integers, just 2^32 bits = 500 MiB.
> It's actually not that much RAM, depending on your target system, and
> would let you check for integers with O(1) complexity (rather than O(log
> N)).

However, it can still be slower, since it's more or less the worst thing you
can do to the cache.


==============================================================================
TOPIC: (&vec)== &vec[0]?
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/d77c87f0acfdcd75?hl=en
==============================================================================

== 1 of 1 ==
Date: Wed, Oct 1 2008 7:27 am
From: Juha Nieminen


Pete Becker wrote:
> On 2008-09-30 14:14:32 -0400, Ioannis Vranos
> <ivranos@no.spam.nospamfreemail.gr> said:
>
>> C++03:
>>
>>
>> Is it always guaranteed that in vector:
>>
>>
>> vector<int> vec(10);
>>
>> &vec always points to the first element of the array, for vec.size()> 0?
>
> No. In fact, it's almost certainly not true. vector dynamically
> allocates memory for its stored objects, so &vec[0] has no inherent
> relationship to &vec.

Since we don't know what "vector" he is talking about (since he didn't
say he is talking specifically about std::vector), it could
theoretically be possible for this to be some kind of user-defined
vector class for which &vec and &vec[0] are the same thing.

(Yes, just nitpicking.)


==============================================================================
TOPIC: templates
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/72aa4d4f4ae0f080?hl=en
==============================================================================

== 1 of 3 ==
Date: Wed, Oct 1 2008 7:30 am
From: Juha Nieminen


puzzlecracker wrote:
> Team,
>
> C++ has been around since 1986, why templates are still regarded is a
> new feature by most compiler vendors and not fully supported (for
> example export feature). Look at other popular languages -- say Java,
> CSharp --and templates , also known as generics, are fully implemented
> and supported in latest releases. Yes, in C++ they are implemented
> differently, yet not better. Then why C++ is so lagging behind. Can't
> we get ourself together? It took us a decade to come up with the new
> standard, yet it's still in the making -- Java 6.0 and .NET 3.0
> blossomed in record time.

Java and C# *don't* implement export templates, as defined by the C++
standard. Nothing even close.

Most modern C++ compilers implement almost everything in the C++
standard except export templates. That's not because all the compiler
developers are lazy. It's because it's a complicated problem (and not
something deemed very urgent, as people can live without).

== 2 of 3 ==
Date: Wed, Oct 1 2008 9:42 am
From: puzzlecracker


On Oct 1, 10:30 am, Juha Nieminen <nos...@thanks.invalid> wrote:
> puzzlecracker wrote:
> > Team,
>
> > C++ has been around since 1986, why templates are still regarded is a
> > new feature by most compiler vendors and not fully supported   (for
> > example export feature). Look at other popular languages -- say Java,
> > CSharp --and templates , also known as generics, are fully implemented
> > and supported in latest releases. Yes, in C++ they are implemented
> > differently, yet not  better. Then why C++ is so lagging behind. Can't
> > we get ourself together?   It took us a decade to come up with the new
> > standard, yet it's still in the making -- Java 6.0 and .NET 3.0
> > blossomed in record time.
>
>   Java and C# *don't* implement export templates, as defined by the C++
> standard. Nothing even close.
>
>   Most modern C++ compilers implement almost everything in the C++
> standard except export templates. That's not because all the compiler
> developers are lazy. It's because it's a complicated problem (and not
> something deemed very urgent, as people can live without).

New standard is coming: any thoughts as to its commercial acceptance?
I wonder how much of cli will be compilable as well as used in the
industry upon its release

== 3 of 3 ==
Date: Wed, Oct 1 2008 9:45 am
From: Erik Wikström


On 2008-10-01 14:58, puzzlecracker wrote:
>> That is a real question. About the only answer I can give is
>> that I think that the vendors don't care about the standard (or
>> their users).
>
> Unless, templates won't gain a wide acceptance, there is no reason not
> to implement them. Usually more useful features packed in the
> compiler, translates into $$$$
>
>
>> Two major differences. First, generics in Java (and I suppose
>> C#---I don't know the language) are several orders of magnitude
>> simpler than templates in C++. (And a lot less powerful.)
>> Second, neither language has a standard, and both have a
>> "primary provider", who more or less "standardizes" what he
>> wants, or in other words, what is easy for him to implement.
>
> Wouldn't be better if standardization committee was affiliated, if not
> fully responsible, for the implementation, much like with C# and Java?

Sure it would, will you pay them? The people who partake in the
standardisation effort does not get paid (at least not by ISO) to do so.
They do it on their own time and for their own money unless they can
convince some company to do it for them.

>> > Yes, in C++ they are implemented differently, yet not better.
>>
>> They are specified differently, not just implemented
>> differently. As for better... C++ templates are significantly
>> more powerful than the templates in other languages, and that
>> does cause implementors problems.
>
> I agree, they're more powerful in essence, yet most its power has yet
> to come to compiler vendors. At my current employer (as well as
> previous) we don't have any code using templates; thought this is not
> a representative sample set.

And what exactly is it that your compiler does not support (except for
export)? And what compiler are you using? Those compilers I've been
using supports templates quite well, while you might not be able to do
all the fancy MTP the standard allows you can do everything (except
export) that I've ever tried.

--
Erik Wikström


==============================================================================
TOPIC: cout vs std::cout
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/4f48acdaa9e16cee?hl=en
==============================================================================

== 1 of 1 ==
Date: Wed, Oct 1 2008 7:33 am
From: Juha Nieminen


James Kanze wrote:
> So I write one line which makes each of the following lines
> shorter. One line which might make the difference between
> having to break an expression into two lines or not (because my
> coding guidelines don't allow lines longer than 80 characters).

If a code line is so long that it exceeds 80 characters, in my opinion
it *should* be broken into several lines.

(Nitpicking: Does your coding guidelines allow you to write lines
which are *exactly* 80 characters? Does the newline at the end count as
a character?)


==============================================================================
TOPIC: wrapping std::vector<> to track memory usage?
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/03c4b2188e8040c6?hl=en
==============================================================================

== 1 of 1 ==
Date: Wed, Oct 1 2008 7:39 am
From: Juha Nieminen


jacek.dziedzic@gmail.com wrote:
> On Sep 30, 6:51 pm, Juha Nieminen <nos...@thanks.invalid> wrote:
>> Note, however, that by using this technique you will only be able to
>> track the amount of space requested from std::vector *explicitly*.
>> There's no way of knowing how much memory the std::vector is *really*
>> allocating behind the scenes.
>
> What would std::vector<> be allocating "behind the scenes"?

When you perform a "vec.push_back(value);" you might track that the
size of the vector increased by sizeof(value), when in fact it may well
be that the size of the vector increased by a lot more.

> I'm mostly attempting to track potential memory leaks

Aren't there tools to do exactly that, such as valgrind?

> Thanks for the helpful answer. Are there any drawbacks to the
> custom-allocator approach that Maxim Yegorushkin suggested?

It's probably the easiest way to track the amount of memory explicitly
allocated in the program. Of course you would have to make sure that
everything is indeed using that allocator.


==============================================================================
TOPIC: CppDoc, please help
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/a605d88081dbaf63?hl=en
==============================================================================

== 1 of 3 ==
Date: Wed, Oct 1 2008 8:01 am
From: moongeegee


End-of-file while in a quoted string on line 0 (file = '/usr/people/
projects/xxx.C'). Parsing of "/usr/people/project/xxx.C" was
unsuccessful.

Please shed a light.
Thanks in advance.

== 2 of 3 ==
Date: Wed, Oct 1 2008 8:08 am
From: Obnoxious User


On Wed, 01 Oct 2008 08:01:50 -0700, moongeegee wrote:

> End-of-file while in a quoted string on line 0 (file = '/usr/people/
> projects/xxx.C'). Parsing of "/usr/people/project/xxx.C" was
> unsuccessful.
>
> Please shed a light.
> Thanks in advance.

The error message seems pretty clear.

--
OU
Remember 18th of June 2008, Democracy died that afternoon.
http://frapedia.se/wiki/Information_in_English

== 3 of 3 ==
Date: Wed, Oct 1 2008 8:23 am
From: moongeegee


On Oct 1, 11:08 am, Obnoxious User <O...@127.0.0.1> wrote:
> On Wed, 01 Oct 2008 08:01:50 -0700, moongeegee wrote:
> > End-of-file while in a quoted string on line 0 (file = '/usr/people/
> > projects/xxx.C'). Parsing of "/usr/people/project/xxx.C" was
> > unsuccessful.
>
> > Please shed a light.
> > Thanks in advance.
>
> The error message seems pretty clear.
>
> --
> OU
> Remember 18th of June 2008, Democracy died that afternoon.http://frapedia.se/wiki/Information_in_English

There is comment on the first line as //
It is not a end of file.


==============================================================================
TOPIC: initialization failure
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/e168c87901f12d38?hl=en
==============================================================================

== 1 of 1 ==
Date: Wed, Oct 1 2008 8:03 am
From: Obnoxious User


On Wed, 01 Oct 2008 06:07:10 -0700, puzzlecracker wrote:

>> ok, got it, cannot call constructor in a constructor.
>
> sure you can, in your case, as someone already mention, you're creating
> a new object.
>
> Here is how you can call another ctor
>
> class A{
> A(){}
> A():this(){
>
> }
>
> };

No you can't.

http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.3

--
OU
Remember 18th of June 2008, Democracy died that afternoon.
http://frapedia.se/wiki/Information_in_English


==============================================================================
TOPIC: What's the standard say about this code?
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/ba343bcb425e7e31?hl=en
==============================================================================

== 1 of 1 ==
Date: Wed, Oct 1 2008 8:11 am
From: Maxim Yegorushkin


On Oct 1, 12:49 pm, Triple-DES <DenPlettf...@gmail.com> wrote:
> On 1 Okt, 12:50, "Daniel T." <danie...@earthlink.net> wrote:
>
>
>
> > James Kanze <james.ka...@gmail.com> wrote:
> > > "Daniel T." <danie...@earthlink.net> wrote:
> > > > #include <cassert>
>
> > > > class Foo {
> > > > public:
> > > >         virtual void fnA() = 0;
> > > >         virtual void fnB() = 0;
> > > > };
>
> > > > int main() {
> > > >         assert( &Foo::fnB );
> > > >         assert( &Foo::fnA );
> > > > }
>
> > > > What does the standard say about the above code?
>
> > > There should be no problem with it.
>
> > > > In the compiler I'm using now, the first assert will not fire,
> > > > but the second one will. I expected that neither assert would
> > > > fire...
>
> > > It's guaranteed by the standard.  It works with the three
> > > compilers I have access to (Sun CC, g++ and VC++), at least when
> > > you compile in standard conformant mode.  (Note that by default,
> > > pointers to member functions do not work in VC++.  You must use
> > > the option /vmg.  Not that I think that their non-conformity
> > > otherwise would play a role here.)
>
> > Can I get chapter and verse from the standard on this? It sounds like I
> > need to submit a bug report to the compiler vender.
>
> I believe it is disallowed by 4.11/1 [conv.mem]:
>
> "A null pointer constant (4.10) can be converted to a pointer to
> member type; the result is the null member pointer value of that type
> and is distinguishable from any pointer to member not created from a
> null pointer constant.(...)"
>
> Therefore, an rvalue obtained by using address-of on a member shall
> not yield a null pointer constant.

In the original question a member function pointer gets converted to
bool. Is 4.11/1 applicable here?

--
Max


==============================================================================
TOPIC: ===Welcome to comp.lang.c++! Read this first.
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/bcde80859cb37d0f?hl=en
==============================================================================

== 1 of 1 ==
Date: Wed, Oct 1 2008 9:30 am
From: Shiva


Welcome to comp.lang.c++! Read this first.

This post is intended to give the new reader an introduction to reading
and posting in this newsgroup. We respectfully request that you read
all the way through this post, as it helps make for a more pleasant
and useful group for everyone.

First of all, please keep in mind that comp.lang.c++ is a group for discussion
of general issues of the C++ programming language, as defined by the ANSI/ISO
language standard. If you have a problem that is specific to a particular system
or compiler, you are much more likely to get complete and accurate answers in a
group that specializes in your platform. A listing of some newsgroups is given
at the end of this post.

The FAQ (Frequently Asked Question) list has a wealth of information for
both the new and veteran C++ programmer. No matter what your experience
level, you are encouraged to read the entire list, if only to familiarize
yourself with what answers are available to minimize redundant replies.
The comp.lang.c++ FAQ is available at http://www.parashift.com/c++-faq-lite/

If the FAQ list does not help, then many regular readers of this group
are happy to assist with problems of standard C++. We have only a few
requests that we ask be adhered to, for the benefit of all:

* Please put a short summary in the subject line. Descriptions such as
"HELP!!!!!!" are not helpful, and many regular posters ignore such
requests. A good example is, "Problem with Virtual Functions."

* State the question or the problem clearly and concisely. Describe what
you are trying to do, and the problem you are running into. Include all
relevant error messages.

* Include the smallest, complete and compilable program that exhibits your
problem. As a rule, posters in comp.lang.c++ will not do homework, but will
give helpful hints if you have shown some willingness to try a solution.

* comp.lang.c++ is forum for discussion, and as such some regular posters do
not give E-mail replies. Very often follow-ups to postings have corrections,
so plan on taking part in the discussion if you post a question. If you
do receive e-mail replies, it is considered polite to post a summary.

* Don't post in HTML format. Many readers of this newsgroup don't use
newsreaders which can handle HTML postings.

* If you have to include source code in your post, include the
source in the message body. Don't use attachments. A lot
of contributors to this newsgroup won't even notice the existence
of attachments or won't open them. You try to get any help
you can get, don't you?

Some netiquette topics which frequently crop up on comp.lang.c++ are
also answered in the FAQ.

* Should I post job advertisements and/or resumes on comp.lang.c++?
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.10

* What if I really need a job; should I post my resume on comp.lang.c++?
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.11

* What should I do to someone who posts something off-topic?
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.12

A note on comp.lang.c++ etiquette: Accuracy is valued very highly in this
newsgroup; therefore posts are frequently corrected, sometimes perhaps
too harshly, and often to the annoyance of new posters who consider the
correction trivial. Do not take it personally; the best way to fit in
with comp.lang.c++ is to express gratitude for the correction, move on,
and be more careful next time.

This is a very busy group, so these requests are designed to make it as
pleasant and efficient an experience as possible. We hope it proves
a valuable commodity to you.

A list of some Newsgroups :
Languages and Programming
-------------------------
comp.lang.c The C Programming Language
comp.lang.asm.x86 x86 assembly language programming
comp.programming Non-language specific programming
comp.graphics.algorithms Issues of computer graphics

Operating Systems
-----------------
comp.os.msdos.programmer DOS, BIOS, Memory Models, interrupts,
screen handling, hardware
comp.os.ms-windows.programmer.win32 MS/Windows: Mice, DLLs, hardware
comp.os.os2.programmer.misc OS/2 Programming
comp.sys.mac.programmer.misc Macintosh Programming
comp.unix.programmer General Unix: processes, pipes, POSIX,
curses, sockets
comp.unix.[vendor] Various Unix vendors

Microsoft VC++
-------------
microsoft.public.vc.language VC++ issues
microsoft.public.vc.mfc MFC Issues
microsoft.public.dotnet.languages.vc C++/CLR Issues
microsoft.public.dotnet.framework .Net Framework


Borland C++ Builder
-------------------
borland.public.cppbuilder.language Borland C++ Builder
borland.public.cpp.language
borland.public.cppbuilder

-Shiva
http://www.slack.net/~shiva/welcome.txt


Wed Oct 1 12:30:00 EDT 2008


==============================================================================
TOPIC: Wholesale NFL Jerseys Mlb jerseys Nhl hockey jerseys www.ciciaaa.cn
sale NFL Jerseys Mlb jerseys Nhl hockey jerseys www.ciciaaa.cn
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/b62a55fd7dde590a?hl=en
==============================================================================

== 1 of 1 ==
Date: Wed, Oct 1 2008 9:54 am
From: cicitrade01@yahoo.cn


www.ciciaaa.cn NFL Jerseys www.ciciaaa.cn

Arizona Cardinals Atlanta Falcons Baltimore Ravens Buffalo Bills
Cincinnati Bengals Cleveland Browns Carolina Panthers Chicago Bears
Denver Broncos Dallas Cowboys Detroit Lions Houston Texans
Indianapolis Colts Jacksonville Jaguars Kansas City Chiefs Green Bay
Packers Miami Dolphins Minnesota Vikings New England Patriots New York
Jets New York Giants New Orleans Saints Oakland Raiders Pittsburgh
Steelers Philadelphia Eagles San Diego Chargers San Francisco 49ers
Seattle Seahawks St Louis Rams Tennessee Titans Tampa Bay Buccaneers
Washington Redskins
www.ciciaaa.cn Nhl hockey jerseys www.ciciaaa.cn

Atlanta Thrashers Anaheim Mighty Ducks Boston Bruins Buffalo Sabres
Calgary Flames Carolina Hurricanes Chicago Blackhawks Colorado
Avalanche Columbus Blue Jackets Dallas Stars Detroit Red Wings
Edmonton Oilers Florida Panthers Los Angeles Kings Minnesota Wild
Montreal Canadians Nashville Predators New Jersey Devils NY Islanders
NY Rangers Ottawa Senators Philadelphia Flyers Phoenix Coyotes
Pittsburgh Penguins San Jose Sharks St Louis Blues Tampa Bay Lightning
Toronto Maple Leafs Washington Capitals Vancouver Canucks
www.ciciaaa.cn Mlb jerseys www.ciciaaa.cn

Anaheim Angels Arizona Diamondbacks Atlanta Braves Baltimore Orioles
Boston Red Sox Chicago Cubs Chicago White Sox Cincinnati Reds
Cleveland Indians Colorado Rockies Detroit Tigers Florida Marlins
Houston Astros Kansas City Royals Los Angeles Dodgers Milwaukee
Brewers Minnesota Twins New York Mets New York Yankees Oakland
Athletics Philadelphia Phillies Pittsburgh Pirates San Diego Padres
San Francisco Giants Seattle Mariners St Louis Cardinals Tampa Bay
Devil Rays Texas Rangers Toronto Blue Jays Washington Naationals

www.ciciaaa.cn NFL Jerseys www.ciciaaa.cn

Arizona Cardinals Atlanta Falcons Baltimore Ravens Buffalo Bills
Cincinnati Bengals Cleveland Browns Carolina Panthers Chicago Bears
Denver Broncos Dallas Cowboys Detroit Lions Houston Texans
Indianapolis Colts Jacksonville Jaguars Kansas City Chiefs Green Bay
Packers Miami Dolphins Minnesota Vikings New England Patriots New York
Jets New York Giants New Orleans Saints Oakland Raiders Pittsburgh
Steelers Philadelphia Eagles San Diego Chargers San Francisco 49ers
Seattle Seahawks St Louis Rams Tennessee Titans Tampa Bay Buccaneers
Washington Redskins
www.ciciaaa.cn Nhl hockey jerseys www.ciciaaa.cn

Atlanta Thrashers Anaheim Mighty Ducks Boston Bruins Buffalo Sabres
Calgary Flames Carolina Hurricanes Chicago Blackhawks Colorado
Avalanche Columbus Blue Jackets Dallas Stars Detroit Red Wings
Edmonton Oilers Florida Panthers Los Angeles Kings Minnesota Wild
Montreal Canadians Nashville Predators New Jersey Devils NY Islanders
NY Rangers Ottawa Senators Philadelphia Flyers Phoenix Coyotes
Pittsburgh Penguins San Jose Sharks St Louis Blues Tampa Bay Lightning
Toronto Maple Leafs Washington Capitals Vancouver Canucks
www.ciciaaa.cn Mlb jerseys www.ciciaaa.cn

Anaheim Angels Arizona Diamondbacks Atlanta Braves Baltimore Orioles
Boston Red Sox Chicago Cubs Chicago White Sox Cincinnati Reds
Cleveland Indians Colorado Rockies Detroit Tigers Florida Marlins
Houston Astros Kansas City Royals Los Angeles Dodgers Milwaukee
Brewers Minnesota Twins New York Mets New York Yankees Oakland
Athletics Philadelphia Phillies Pittsburgh Pirates San Diego Padres
San Francisco Giants Seattle Mariners St Louis Cardinals Tampa Bay
Devil Rays Texas Rangers Toronto Blue Jays Washington Naationals


==============================================================================
TOPIC: The need of Unicode types in C++0x
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/56ed90f231762d03?hl=en
==============================================================================

== 1 of 1 ==
Date: Wed, Oct 1 2008 9:57 am
From: Ioannis Vranos


REH wrote:
> On Oct 1, 5:59 am, Ioannis Vranos <ivra...@no.spam.nospamfreemail.gr>
> wrote:
>> Hi, I am currently learning QT, a portable C++ framework which comes
>> with both a commercial and GPL license, and which provides conversion
>> operations to its various types to/from standard C++ types.
>>
>> For example its QString type provides a toWString() that returns a
>> std::wstring with its Unicode contents.
>>
>> So, since wstring supports the largest character set, why do we need
>> explicit Unicode types in C++?
>>
>> I think what is needed is a "unicode" locale or at the most, some
>> unicode locales.
>>
>> I don't consider being compatible with C99 as an excuse.
>
> If I understand what you are asking...
>
> wstring in the standard defines neither the character set, nor the
> encoding. Given that Unicode is currently a 21-bit standard, how can
> wstring support the largest character set on a system where wchar_t is
> 16-bits (assuming a one-character-per-element encoding)? You could
> only support the BMP (which is exactly what most systems and language
> that "claim" Unicode support are really capable of).


I do not know much about encodings, only the necessary for me stuff, but
the question does not sound reasonable for me.

If that system supports Unicode as a system-specific type, why can't
wchar_t be made wide enough as that system-specific Unicode type, in
that system?

==============================================================================

You received this message because you are subscribed to the Google Groups "comp.lang.c++"
group.

To post to this group, visit http://groups.google.com/group/comp.lang.c++?hl=en

To unsubscribe from this group, send email to comp.lang.c+++unsubscribe@googlegroups.com

To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.c++/subscribe?hl=en

To report abuse, send email explaining the problem to abuse@googlegroups.com

==============================================================================
Google Groups: http://groups.google.com/?hl=en

No comments: