Description:
Discussion about C++ language, library, standards. (Moderated)
|
|
|
Array types and cv-qualifiers
|
| |
I have read DR "Array types and cv-qualifiers": [link] But I still don't understand whether an array type can be cv- qualified. Lets consider the following examples: 1) Is the program below well-formed? template <class T> struct is_const... more »
|
|
Four kinds of expression
|
| |
The following paper [link] proposes to separate expressions into 3 kinds: rref lvalue, non-rref lvalue, and rvalue. I can imagine 4 kinds of an expression: 1) ref lvalue (which is non-rref lvalue in N3010) 2) non-ref lvalue (new kind) 3) ref rvalue (which is rref lvalue in N3010)... more »
|
|
Qualified-id and qualified names?
|
| |
Hello all - i found there are many places where the Standard refers to qualified-id, but actually in that context no qualified-id appears or the obvious intend was to apply to all qualified names. Examples: 3.4.3.1/1: "If the nested-name-specifier of a qualified-id nominates a class, the name specified after the nested-name-specifier is looked up in... more »
|
|
are members of an r-value also r-values?
|
| |
Hi, I don't seam to be able to find what the draft says about the reference binding to members of r-values. In the following example: struct POD { int x; int y; }; POD rValue(); int & lRef = rValue().x; // valid? int && rRef = rValue().y; // valid? Is any of the two initializations valid?... more »
|
|
Final Call for Participation
|
| |
Please distribute! ------------------------------ -- 4th Annual Boost Conference 2010 ------------------------------ -- Aspen CO, USA, May 10-14, 2010, [link] Final Call for Participation ------------------------------ -- Important dates: Proposal submissions Extended to January 3, 2010... more »
|
|
Templated constructor or copy constructor
|
| |
If I have a templated constructor in a base class, such as: struct Base { template<class U> Base(U arg) { } ...does the templated constructor get called rather than the compiler- generated copy constructor from a derived class's compiler-generated copy constructor, such as: struct Derived : Base { ...?... more »
|
|
initializer_list use in push_back and the like?
|
| |
How come standard library functions like push_back do not accept initializer_list<T>s? In order to do a multiple insertion, one needs to do cont.insert(cont.end(), {values}), which seems like a waste and exactly the thing that push_back and friends should solve. Is this just an oversight?
|
|
Lvalue-to-rvalue conversion vs rvalue reference
|
| |
Hi, 3.10/7 in N3000 Says: "Whenever an lvalue appears in a context where an rvalue is expected, the lvalue is converted to an rvalue;" On the other hand I was pretty sure that the following code shouldn't compile: void possiblyDestroy( Obj && obj ); int main() { Obj obj; possiblyDestroy( obj );... more »
|
|
scope_guard
|
| |
Hi, Is a scope guard functionality not general-purpose enough, to be included in the standard library? This would solve all those requirements for "finally" keyword that destructors cannot handle. We ... std::scope_guard g = [&]{ if(elem.incomplete()) x.rollback(); }; also the implementation appears to be trivial in C++0x:... more »
|
|
|