|
2259 | 2259 | };
|
2260 | 2260 |
|
2261 | 2261 | template <class internT, class externT, class stateT>
|
2262 |
| - class codecvt : public locale::facet, public codecvt_base { |
2263 |
| - public: |
2264 |
| - using intern_type = internT; |
2265 |
| - using extern_type = externT; |
2266 |
| - using state_type = stateT; |
2267 |
| - |
2268 |
| - explicit codecvt(size_t refs = 0); |
2269 |
| - |
2270 |
| - result out(stateT& state, |
2271 |
| - const internT* from, const internT* from_end, const internT*& from_next, |
2272 |
| - externT* to, externT* to_end, externT*& to_next) const; |
2273 |
| - result unshift(stateT& state, |
2274 |
| - externT* to, externT* to_end, externT*& to_next) const; |
2275 |
| - result in(stateT& state, |
2276 |
| - const externT* from, const externT* from_end, const externT*& from_next, |
2277 |
| - internT* to, internT* to_end, internT*& to_next) const; |
2278 |
| - int encoding() const noexcept; |
2279 |
| - bool always_noconv() const noexcept; |
2280 |
| - int length(stateT&, const externT* from, const externT* end, |
2281 |
| - size_t max) const; |
2282 |
| - int max_length() const noexcept; |
2283 |
| - |
2284 |
| - static locale::id id; |
2285 |
| - |
2286 |
| - protected: |
2287 |
| - ~codecvt(); |
2288 |
| - virtual result do_out(stateT& state, |
2289 |
| - const internT* from, const internT* from_end, const internT*& from_next, |
2290 |
| - externT* to, externT* to_end, externT*& to_next) const; |
2291 |
| - virtual result do_in(stateT& state, |
2292 |
| - const externT* from, const externT* from_end, const externT*& from_next, |
2293 |
| - internT* to, internT* to_end, internT*& to_next) const; |
2294 |
| - virtual result do_unshift(stateT& state, |
2295 |
| - externT* to, externT* to_end, externT*& to_next) const; |
2296 |
| - virtual int do_encoding() const noexcept; |
2297 |
| - virtual bool do_always_noconv() const noexcept; |
2298 |
| - virtual int do_length(stateT&, const externT* from, |
2299 |
| - const externT* end, size_t max) const; |
2300 |
| - virtual int do_max_length() const noexcept; |
2301 |
| - }; |
| 2262 | + class codecvt : public locale::facet, public codecvt_base { |
| 2263 | + public: |
| 2264 | + using intern_type = internT; |
| 2265 | + using extern_type = externT; |
| 2266 | + using state_type = stateT; |
| 2267 | + |
| 2268 | + explicit codecvt(size_t refs = 0); |
| 2269 | + |
| 2270 | + result out( |
| 2271 | + stateT& state, |
| 2272 | + const internT* from, const internT* from_end, const internT*& from_next, |
| 2273 | + externT* to, externT* to_end, externT*& to_next) const; |
| 2274 | + result unshift( |
| 2275 | + stateT& state, |
| 2276 | + externT* to, externT* to_end, externT*& to_next) const; |
| 2277 | + result in( |
| 2278 | + stateT& state, |
| 2279 | + const externT* from, const externT* from_end, const externT*& from_next, |
| 2280 | + internT* to, internT* to_end, internT*& to_next) const; |
| 2281 | + |
| 2282 | + int encoding() const noexcept; |
| 2283 | + bool always_noconv() const noexcept; |
| 2284 | + int length(stateT&, const externT* from, const externT* end, size_t max) const; |
| 2285 | + int max_length() const noexcept; |
| 2286 | + |
| 2287 | + static locale::id id; |
| 2288 | + |
| 2289 | + protected: |
| 2290 | + ~codecvt(); |
| 2291 | + virtual result do_out( |
| 2292 | + stateT& state, |
| 2293 | + const internT* from, const internT* from_end, const internT*& from_next, |
| 2294 | + externT* to, externT* to_end, externT*& to_next) const; |
| 2295 | + virtual result do_in( |
| 2296 | + stateT& state, |
| 2297 | + const externT* from, const externT* from_end, const externT*& from_next, |
| 2298 | + internT* to, internT* to_end, internT*& to_next) const; |
| 2299 | + virtual result do_unshift( |
| 2300 | + stateT& state, |
| 2301 | + externT* to, externT* to_end, externT*& to_next) const; |
| 2302 | + |
| 2303 | + virtual int do_encoding() const noexcept; |
| 2304 | + virtual bool do_always_noconv() const noexcept; |
| 2305 | + virtual int do_length(stateT&, const externT* from, const externT* end, size_t max) const; |
| 2306 | + virtual int do_max_length() const noexcept; |
| 2307 | + }; |
2302 | 2308 | }
|
2303 | 2309 | \end{codeblock}
|
2304 | 2310 |
|
|
5278 | 5284 | The specializations required in Table~\ref{tab:localization.required.specializations}~(\ref{locale.category}), namely
|
5279 | 5285 | \tcode{moneypunct<char>},
|
5280 | 5286 | \tcode{moneypunct<\brk{}wchar_t>},
|
5281 |
| -\tcode{moneypunct<char,true>}, |
| 5287 | +\tcode{moneypunct<char, true>}, |
5282 | 5288 | and
|
5283 |
| -\tcode{moneypunct<wchar_t,true>}, |
| 5289 | +\tcode{moneypunct<wchar_t, true>}, |
5284 | 5290 | return an object of type
|
5285 | 5291 | \tcode{pattern}
|
5286 | 5292 | initialized to
|
|
0 commit comments