tmp/tmp3kuuoci9/{from.md → to.md}
RENAMED
|
@@ -10,25 +10,32 @@ namespace std {
|
|
| 10 |
void operator=(const facet&) = delete;
|
| 11 |
};
|
| 12 |
}
|
| 13 |
```
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
Template parameters in this Clause which are required to be facets are
|
| 16 |
those named `Facet` in declarations. A program that passes a type that
|
| 17 |
is *not* a facet, or a type that refers to a volatile-qualified facet,
|
| 18 |
as an (explicit or deduced) template parameter to a locale function
|
| 19 |
expecting a facet, is ill-formed. A const-qualified facet is a valid
|
| 20 |
template argument to any locale function that expects a Facet template
|
| 21 |
parameter.
|
| 22 |
|
| 23 |
The `refs` argument to the constructor is used for lifetime management.
|
| 24 |
-
|
| 25 |
-
- For `refs == 0`, the implementation performs
|
| 26 |
`delete static_cast<locale::facet*>(f)` (where `f` is a pointer to the
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
facet.
|
| 30 |
|
| 31 |
Constructors of all facets defined in this Clause take such an argument
|
| 32 |
and pass it along to their `facet` base class constructor. All
|
| 33 |
one-argument constructors defined in this Clause are *explicit*,
|
| 34 |
preventing their participation in automatic conversions.
|
|
|
|
| 10 |
void operator=(const facet&) = delete;
|
| 11 |
};
|
| 12 |
}
|
| 13 |
```
|
| 14 |
|
| 15 |
+
Class `facet` is the base class for locale feature sets. A class is a
|
| 16 |
+
*facet* if it is publicly derived from another facet, or if it is a
|
| 17 |
+
class derived from `locale::facet` and contains a publicly accessible
|
| 18 |
+
declaration as follows: [^3]
|
| 19 |
+
|
| 20 |
+
``` cpp
|
| 21 |
+
static ::std::locale::id id;
|
| 22 |
+
```
|
| 23 |
+
|
| 24 |
Template parameters in this Clause which are required to be facets are
|
| 25 |
those named `Facet` in declarations. A program that passes a type that
|
| 26 |
is *not* a facet, or a type that refers to a volatile-qualified facet,
|
| 27 |
as an (explicit or deduced) template parameter to a locale function
|
| 28 |
expecting a facet, is ill-formed. A const-qualified facet is a valid
|
| 29 |
template argument to any locale function that expects a Facet template
|
| 30 |
parameter.
|
| 31 |
|
| 32 |
The `refs` argument to the constructor is used for lifetime management.
|
| 33 |
+
For `refs == 0`, the implementation performs
|
|
|
|
| 34 |
`delete static_cast<locale::facet*>(f)` (where `f` is a pointer to the
|
| 35 |
+
facet) when the last `locale` object containing the facet is destroyed;
|
| 36 |
+
for `refs == 1`, the implementation never destroys the facet.
|
|
|
|
| 37 |
|
| 38 |
Constructors of all facets defined in this Clause take such an argument
|
| 39 |
and pass it along to their `facet` base class constructor. All
|
| 40 |
one-argument constructors defined in this Clause are *explicit*,
|
| 41 |
preventing their participation in automatic conversions.
|