Monday, December 1, 2014

Digest for comp.lang.c++@googlegroups.com - 8 updates in 4 topics

comp.lang.c++@googlegroups.com Google Groups
Unsure why you received this message? You previously subscribed to digests from this group, but we haven't been sending them for a while. We fixed that, but if you don't want to get these messages, send an email to comp.lang.c+++unsubscribe@googlegroups.com.
Lynn McGuire <lmc@winsim.com>: Dec 01 02:54PM -0600

"A quick poll about order of evaluation…"
http://herbsutter.com/2014/12/01/a-quick-poll-about-order-of-evaluation/
 
"Consider this program fragment:"
 
" std::vector<int> v = { 0, 0 };
int i = 0;
v[i++] = i++;
std::cout << v[0] << v[1] << endl; "
 
"My question is not what it might print under today's C++ rules. The third line runs afoul of two different categories of undefined
and unspecified behavior."
 
"Rather, my question is what you would like the result to be. Please let me know."
 
My answer is 02.
 
Lynn
Martijn Lievaart <m@rtij.nl.invlalid>: Dec 01 10:06PM +0100

On Mon, 01 Dec 2014 14:54:07 -0600, Lynn McGuire wrote:
 
> "Rather, my question is what you would like the result to be. Please let
> me know."
 
Undefined. It's fine as it is.
 
M4
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Dec 01 09:38PM

On 01/12/2014 20:54, Lynn McGuire wrote:
 
> "Rather, my question is what you would like the result to be. Please let
> me know."
 
> My answer is 02.
 
I would like the result to remain the same as it is now, i.e. undefined.
 
/Flibble
David Harmon <source@netcom.com>: Dec 01 02:17PM -0800

On Mon, 01 Dec 2014 14:54:07 -0600 in comp.lang.c++, Lynn McGuire
<lmc@winsim.com> wrote,
 
>"My question is not what it might print under today's C++ rules. The third line runs afoul of two different categories of undefined
>and unspecified behavior."
 
>"Rather, my question is what you would like the result to be.
 
I would like it to be undefined behavior.
Robert Hutchings <rm.hutchings@gmail.com>: Dec 01 02:01PM -0600

http://homepages.e3.net.nz/~djm/cppcontainers.html
 
Do you agree with the flowchart at bottom of page?
Ian Collins <ian-news@hotmail.com>: Dec 02 09:13AM +1300

Robert Hutchings wrote:
> http://homepages.e3.net.nz/~djm/cppcontainers.html
 
> Do you agree with the flowchart at bottom of page?
 
While it leads to a correct solution for simple applications, it might
not lead too an optimal solution. Too few paths lead to vector.
 
--
Ian Collins
"Öö Tiib" <ootiib@hot.ee>: Dec 01 01:56AM -0800

On Friday, 28 November 2014 04:24:09 UTC+2, Vincenzo Mercuri wrote:
 
> bool operator()( const T& lhs, const T& rhs ) const;
 
> that in turn requires T (OP's "duty"..) to define operator< which *must*
> be const because it's called by a const member function.
 
Why it matters if 'const' or not 'const' member 'operator()' of 'std::less<>' is called? 'std::less<>' is anyway stateless unless
you have yourself specialized it as stateful.
 
All comparators take the arguments that are compared as immutable (or
by value) because comparison that mutates its arguments is unexpected
and confusing even to its author.
Louis Krupp <lkrupp@nospam.pssw.com.invalid>: Dec 01 02:39AM -0700

On Fri, 14 Nov 2014 08:16:27 -0600, Robert Hutchings
 
>http://shop.oreilly.com/product/0636920033707.do
 
>You can also use PayPal to buy. Paperback will be out in December.
 
Cyber Monday sale on EBooks:
 
http://www.oreilly.com/
 
Louis
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: