From Jason Turner

[res.on.objects]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp6utmlt0t/{from.md → to.md} +15 -13
tmp/tmp6utmlt0t/{from.md → to.md} RENAMED
@@ -1,18 +1,20 @@
1
- #### Shared objects and the library <a id="res.on.objects">[[res.on.objects]]</a>
2
 
3
  The behavior of a program is undefined if calls to standard library
4
  functions from different threads may introduce a data race. The
5
  conditions under which this may occur are specified in 
6
- [[res.on.data.races]]. Modifying an object of a standard library type
7
- that is shared between threads risks undefined behavior unless objects
8
- of that type are explicitly specified as being sharable without data
9
- races or the user supplies a locking mechanism.
10
-
11
- In particular, the program is required to ensure that completion of the
12
- constructor of any object of a class type defined in the standard
13
- library happens before any other member function invocation on that
14
- object and, unless otherwise specified, to ensure that completion of any
15
- member function invocation other than destruction on such an object
16
- happens before destruction of that object. This applies even to objects
17
- such as mutexes intended for thread synchronization.
 
 
18
 
 
1
+ #### Library object access <a id="res.on.objects">[[res.on.objects]]</a>
2
 
3
  The behavior of a program is undefined if calls to standard library
4
  functions from different threads may introduce a data race. The
5
  conditions under which this may occur are specified in 
6
+ [[res.on.data.races]].
7
+
8
+ [*Note 1*: Modifying an object of a standard library type that is
9
+ shared between threads risks undefined behavior unless objects of that
10
+ type are explicitly specified as being sharable without data races or
11
+ the user supplies a locking mechanism. *end note*]
12
+
13
+ If an object of a standard library type is accessed, and the beginning
14
+ of the object’s lifetime ([[basic.life]]) does not happen before the
15
+ access, or the access does not happen before the end of the object’s
16
+ lifetime, the behavior is undefined unless otherwise specified.
17
+
18
+ [*Note 2*: This applies even to objects such as mutexes intended for
19
+ thread synchronization. — *end note*]
20