From Jason Turner

[diff.special]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp8d5drfew/{from.md → to.md} +0 -28
tmp/tmp8d5drfew/{from.md → to.md} RENAMED
@@ -1,28 +0,0 @@
1
- ### Clause [[special]]: special member functions <a id="diff.special">[[diff.special]]</a>
2
-
3
- [[class.copy]] **Change:** Copying volatile objects.
4
-
5
- The implicitly-declared copy constructor and implicitly-declared copy
6
- assignment operator cannot make a copy of a volatile lvalue. For
7
- example, the following is valid in ISO C:
8
-
9
- ``` cpp
10
- struct X { int i; };
11
- volatile struct X x1 = {0};
12
- struct X x2 = x1; // invalid C++
13
- struct X x3;
14
- x3 = x1; // also invalid C++
15
- ```
16
-
17
- **Rationale:** Several alternatives were debated at length. Changing the
18
- parameter to `volatile` `const` `X&` would greatly complicate the
19
- generation of efficient code for class objects. Discussion of providing
20
- two alternative signatures for these implicitly-defined operations
21
- raised unanswered concerns about creating ambiguities and complicating
22
- the rules that specify the formation of these operators according to the
23
- bases and members. **Effect on original feature:** Deletion of
24
- semantically well-defined feature. Semantic transformation. If volatile
25
- semantics are required for the copy, a user-declared constructor or
26
- assignment must be provided. If non-volatile semantics are required, an
27
- explicit `const_cast` can be used. Seldom.
28
-