T
Tony
Noah Roberts said:Exactly. Unless you're writing a library that uses move semantics I'm
pretty sure you simply don't need to care what rvalue references are or
how they work. The rvalue reference solves an important problem for
library writers. For instance, you'll now be able to store uncopyable
objects in the standard containers because of this language feature.
More than that I believe. The boost::concepts can do that. The concepts
in the new standard, as a feature of the language and not some coding
hack, allows you to write template code that will only activate for types
that represent the required concepts. In other words, you'll be able to
competently decide which template code to use based on the concepts your
type represents! This is a MAJOR benefit, especially for library authors.
Although not everyone understands concepts in C++, everyone SHOULD.
Concepts are far from new and the entire standard library uses them.
"The entire std lib uses them" is hardly a selling point!
They're just not possible to enforce by the language yet and when you
violate the documented concept interface of a type in the STL you get
template error vomit instead of something nice. The new language simply
takes something you've been using all along and makes it a feature of the
language.
Or patching up (bandaging) a feature lacking or under-developed in the
language?
********
RFP: Separate thread for discussion, analysis, politics of C++ concepts.
High level discussion first recommended (as in, maybe the whole
template/concept subsystem could be eliminated with a higher level
architecture).
Tony