User loginNavigationTake FREE online C/C++ test now!Unix / Linux ProgrammingCode search made simpleYour feedback needed!As a webmaster of this site, I regard you as our most important critic and commentator. We value your opinion and want to know what we are doing right, what we could do better and any other words of wisdom you're willing to pass our way. It would be our greatest motivation which will help us in developing areas you would like to see in this site. We hope you will continue to encourage and support us in our future endeavors.
INDIA |
Forums & BlogsRe: What is __cplusplus for ISO/IEC 14882:2011?
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
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
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.
Welcome to comp.lang.c++! Read this first.
This post is intended to give the new reader an introduction to reading 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?
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
I tend to use
#include <iostream> and let 'format_as_hex' use sprintf() internally. /Jorgen -- Re: What is __cplusplus for ISO/IEC 14882:2011?
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 Francois Grieu Re: Using cout to print hex values; surely you can't be serious
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; and hope that buffering makes that OK? Alternatively, you may want to serialise some bytes to a Re: What is __cplusplus for ISO/IEC 14882:2011?
The paragraph [cpp.predefined]/1 says it shall be 201103L (from the
latest publicly available draft). V Re: Using cout to print hex values; surely you can't be serious
This is not guaranteed to print »FF« as required.
Maybe you wanted to print a hexadecimal representation of { assert c == 0xff; ::std::cout << "FF"; } Re: Using cout to print hex values; surely you can't be serious
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?
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
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
Hello,
We would like to inform you that we have updated our list with the 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 ========== 2011 Federal Taxation, 5th Edition 2011, Pratt.Kulsrud, Instructor Re: Using cout to print hex values; surely you can't be serious
Yeah, brutal isn't it.
Boost::Format provides a printf() type formatting system that isn't Re: Why are you here?
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, OK
I have a problem with someon attruted as humanitarian. Wasn't Hitler one
of those? bill gates is NOT a humanitarian or philanthoper Re: Question about destructors
No more than naked dynamic arrays.
-- Re: Deduce non-type template parameter return value
在 2012年2月8日星期三UTC+8上午8时59分41秒,Ch ris McAce写道:
A template function that accepts any data type and any known function to Any object in a vector can be mapped as in the above code. Re: Why are you here?
not really...
|