Forums & Blogs

Re: What is __cplusplus for ISO/IEC 14882:2011?

comp.lang.c++ Google Group - 9 hours 10 min ago
N3291 (or its sister document N3290) *is* the document that was
accepted as the standard.

It was just a Yes or No vote, with no changes allowed.

Bo Persson

Re: Question about destructors

comp.lang.c++ Google Group - 9 hours 10 min ago
Default initialization was a major overhead in some of my image
processing
code. I replaced std::vector with a home-grown dynamic_array<T> vector
like container that doesn't do default initialization. Problem solved.
It would be nice if it could be done with a custom allocator but you
can't.

Re: Question about destructors

comp.lang.c++ Google Group - 9 hours 10 min ago
Well, possibly a little bit more (default initialisation, storing the
length, and possibly some address calculation if you want to address it
as if it were multidimensional, in zigzag fashion, say. Nothing you
couldn't fix with a templated custom class, though.)

And if those are the speed determining step of your algorithm, you're

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

comp.lang.c++ Google Group - 9 hours 10 min ago
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

Re: What is __cplusplus for ISO/IEC 14882:2011?

comp.lang.c++ Google Group - 9 hours 10 min ago
I (now) understand that "the latest publicly available draft" might be
something after approval of ISO/IEC 14882:2011, which would be a strong
indication that ISO/IEC 14882:2011 also has 201103L.

And indeed there is N3337 Dated: 2012-01-16, wich still has 201103L.

Thus I thank Victor Bazarov, remove my former message, and conclude

Re: Using cout to print hex values; surely you can't be serious

comp.lang.c++ Google Group - 9 hours 10 min ago
I tend to use

#include <iostream>
struct format_as_hex {
....
};
std::cout << format_as_hex(c);

and let 'format_as_hex' use sprintf() internally.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .

Re: What is __cplusplus for ISO/IEC 14882:2011?

comp.lang.c++ Google Group - 9 hours 10 min ago
That answer brings no extra information if N3291 is "the latest
publicly available draft", which is my understanding.

My question is about the *published* standard. There is no way for me
to know if that value was bumped up at the last moment, which would be
kind of logical.

Francois Grieu

Re: Using cout to print hex values; surely you can't be serious

comp.lang.c++ Google Group - 9 hours 10 min ago
But sometimes you want to mix streaming objects with a custom
operator<< with printing hex values of bytes. Are you suggesting
interleaving

std::cout << complex_object;
printf("%x",byte);

and hope that buffering makes that OK?

Alternatively, you may want to serialise some bytes to a
std::stringstream or serialise some bytes to a stream provided by a

Re: What is __cplusplus for ISO/IEC 14882:2011?

comp.lang.c++ Google Group - 9 hours 10 min ago
The paragraph [cpp.predefined]/1 says it shall be 201103L (from the
latest publicly available draft).

V
--
I do not respond to top-posted replies, please don't ask

Re: Using cout to print hex values; surely you can't be serious

comp.lang.c++ Google Group - 9 hours 10 min ago
This is not guaranteed to print »FF« as required.

Maybe you wanted to print a hexadecimal representation of
the value of c as »FF«?

{ assert c == 0xff; ::std::cout << "FF"; }

Re: Using cout to print hex values; surely you can't be serious

comp.lang.c++ Google Group - 9 hours 10 min ago
That static_cast looks superfluous (result of the expression should be
promoted to 'int' if 'c' is a 'char').

/Leigh

What is __cplusplus for ISO/IEC 14882:2011?

comp.lang.c++ Google Group - 9 hours 10 min ago
In N3291 we have "The name __cplusplus is defined to the value 201103L
when compiling a C++ translation unit."

What's the value for that in ISO/IEC 14882:2011?

Francois Grieu

Re: Using cout to print hex values; surely you can't be serious

comp.lang.c++ Google Group - 9 hours 10 min ago
Have you considered that 0xFF is outside the range a signed 'char' is
guaranteed to represent? Or is your 'char' unsigned by default? Just
checking...

Similar to "How do I put my trousers on by pulling them over my head?".

Use 'printf', it seems to suit *this particular task* better.

Very Huge collection of Solutions Manuals & Test Banks

comp.lang.c++ Google Group - 9 hours 10 min ago
Hello,

We would like to inform you that we have updated our list with the
following new titles.

You can contact us directly at Student.p24(at)Hotmail(dot)com .

If the title you are looking for is not listed, do not hesitate to
contact us,
we will try to help.

==========

2011 Federal Taxation, 5th Edition 2011, Pratt.Kulsrud, Instructor

Re: Using cout to print hex values; surely you can't be serious

comp.lang.c++ Google Group - 9 hours 10 min ago
Yeah, brutal isn't it.

Boost::Format provides a printf() type formatting system that isn't
anything like as painful to use.
[link]

Re: Why are you here?

comp.lang.c++ Google Group - 9 hours 10 min ago
It's a public forum dedicated to a specific subject which is of great
personal interest, and where very smart, knowledgeable and friendly people
are frequent contributors.

There are also other incentives to a particular set of users. For example,
if I'm not mistaken a while ago there was a discussion on how some users

OK

comp.lang.c++ Google Group - 9 hours 10 min ago
I have a problem with someon attruted as humanitarian. Wasn't Hitler one
of those? bill gates is NOT a humanitarian or philanthoper

Re: Deduce non-type template parameter return value

comp.lang.c++ Google Group - 9 hours 10 min ago
在 2012年2月8日星期三UTC+8上午8时59分41秒,Ch ris McAce写道:

A template function that accepts any data type and any known function to
operate on a vector of objects to be compiled is different from
an unknown function pointer passed in by the caller part in the run time.

Any object in a vector can be mapped as in the above code.

Syndicate content