Add examples to QLDoc comment

This commit is contained in:
Dave Bartolomeo
2020-10-20 17:34:46 -04:00
parent c739f98f7d
commit 08af0803ff

View File

@@ -843,16 +843,17 @@ class ArrayToPointerConversion extends Conversion, @array_to_pointer {
/**
* A node representing a temporary object created as part of an expression.
*
* This is most commonly seen in the following cases (from [class.temporary]/2):
* - when binding a reference to a prvalue
* - when performing member access on a class prvalue
* - when performing an array-to-pointer conversion or subscripting on an array prvalue
* - when initializing an object of type std::initializer_list from a braced-init-list
* - for certain unevaluated operands
* - when a prvalue that has type other than cv void appears as a discarded-value expression
* This is most commonly seen in the following cases:
* ```c++
* // when binding a reference to a prvalue
* const std::string& r = std::string("text");
*
* This node will only exist if the object is of class type, and even then only if either the
* object's initialization or destruction is non-trivial.
* // when performing member access on a class prvalue
* strlen(std::string("text").c_str());
*
* // when a prvalue of a type with a destructor is discarded
* s.substr(0, 5); // Return value is discarded but requires destruction
* ```
*/
class TemporaryObjectExpr extends Conversion, @temp_init {
/** Gets a textual representation of this conversion. */