Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
comp . std . c++
This is a Usenet group - learn more
Find or start a Google Group about c++.
Group info
Language: English
Group categories:
Computers
More group info »
Discussions
View:  Topic list, Topic summary Topics 1 - 10 of 12917  Older »
Description: Discussion about C++ language, library, standards. (Moderated)
 

Moving cv-qualified objects 
  Hi, I find it a little surprising that 'std::move' doesn't strip away cv-ness. Cv-ness only matters (other than minor technicalities) during the lifetime of an object: both the constructor and the destructor operate on a cv-less object. As moving is, logically, somewhat of an early destruction, It seems only reasonable to expect that once an... more »
By Robert Powell  - Jun 3 - 1 new of 1 message    

is variable declaration in if statement conditional expression allowed by standard? 
  I didn't think it was, but recently I wrote this and was surprised when it actually worked on my compiler (G++): if (int err_code = some_function()) { throw std::runtime_error(strerror(er r_code)); ... Testing is seemed that err_code was scoped to the if statement in the same way it would have been in a for loop.... more »
By Brendan  - May 29 - 2 new of 2 messages    

Smart pointer comparison - why a difference? 
  In C++11, operator< for unique_ptr [unique.ptr.special] is defined as std::less<CT>()(x.get(), y.get()) where CT is the common_type of the unique_ptr's internal pointer typedefs. On the other hand, operator< for shared_ptr [util.smartptr.shared.cmp] is defined as std::less<V>()(a.get(), b.get())... more »
By Bo Persson  - May 28 - 2 new of 2 messages    

Atomic ordering: extended total order memory_order_seq_cst for locks 
  There's this note in 29.3-p3: [ Note: Although it is not explicitly required that S include locks, it can always be extended to an order that does include lock and unlock operations, since the ordering between those is already included in the "happens before" ordering. - end note ] What does it mean by "always"?... more »
By itaj sherman  - May 28 - 1 new of 1 message    

An "intermediate value" in two-phase initialization 
  Hi, It looks like a global object (non-local variable with static storage duration) can be initialized in two phases (not to mention the "constant initialization"). So, there is a moment when the first phase -- zero-initialization -- has set the variable to value 0, but the dynamic initialization has not yet started; and at this point it may... more »
By Andrzej Krzemieński  - May 22 - 3 new of 3 messages    

Different begin and end types in range-based for 
  I'm not sure whether this is should be submitted as a DR or if I should just live with it, but it would be convenient to have more flexibility in implementing containers with range-based for. 6.5.4 [stmt.ranged] defines this statement: for ( for-range-declaration : expression ) statement as equivalent to:... more »
By Andy Lutomirski  - May 3 - 4 new of 4 messages    

Reserve(n) for unordered containers reserves for n-1 elements. 
  Hello, When calling 'x.reserve(n)' for an unordered container I'd expect to be able to insert n elements without invalidating iterators. But as the standard is written, the guarantee only holds for n-1 elements. For a container with max_load_factor of 1, reserve(n) is equivalent to rehash(ceil(n/1)), which is rehash(n). rehash(n) requires that the... more »
By Daniel James  - May 3 - 2 new of 2 messages    

Towards an object class for C++ 
  Hello all, I would like to put here, in order to be discussed, what I think it's still a missing point in the C++ standard library. I'm trying to implement an object class for c++, like C# and java have, but adapted to the c++ needs. My class is targeted at c++11 (not c++03 for now). The main goals I want to achieve are:... more »
By german diago  - May 2 - 2 new of 2 messages    

Diffs between C++98 and C++2003? 
  I was, at one time, a fairly active participant in this group, and very familiar with the C++98 standard. However, my job gave me no opportunities to use what I knew about C++, so I had very little actual experience with it. I lost interest in following C++ standardization issues around the time the 2003 standard was being developed.... more »
By James Kuyper  - May 2 - 5 new of 5 messages    

make_shared and friends. 
  Does the C++11 specification allow you to say that the `make_shared` template is a friend, and thus guarantee that it can access the appropriate private constructors of a class? Yes, there is syntax that would make `make_shared` a friend. But does the spec *require* that the constructors are called directly from `make_shared` itself, since... more »
By Jason McKesson  - Apr 27 - 8 new of 8 messages    

1 - 10 of 12917   « Newer | Older »

XML