@@ -226,6 +226,7 @@ class Errata {
226
226
*
227
227
* The error code is set to the default.
228
228
* @a text is localized to @a this and does not need to be persistent.
229
+ * The severity is updated to @a severity if the latter is more severe.
229
230
*/
230
231
self_type ¬e (Severity severity, std::string_view text);
231
232
@@ -254,6 +255,8 @@ class Errata {
254
255
* This is a unified interface for other fixed text @c note methods which all forward to this
255
256
* method. If @a severity does not have a value then the annotation is never filtered.
256
257
*
258
+ * The severity is updated to @a severity if the latter is set and more severe.
259
+ *
257
260
* @see FILTER_SEVERITY
258
261
*/
259
262
self_type ¬e_s (std::optional<Severity> severity, std::string_view text);
@@ -280,6 +283,8 @@ class Errata {
280
283
* @param fmt Format string (@c BufferWriter style).
281
284
* @param args Arguments for values in @a fmt.
282
285
* @return A reference to this object.
286
+ *
287
+ * The severity is updated to @a severity if the latter is more severe.
283
288
*/
284
289
template <typename ... Args> self_type ¬e (Severity severity, std::string_view fmt, Args &&... args);
285
290
@@ -291,6 +296,8 @@ class Errata {
291
296
*
292
297
* This is intended for use by external "helper" methods that pass their own arguments to this
293
298
* using @c forward_as_tuple.
299
+ *
300
+ * The severity is updated to @a severity if the latter is more severe.
294
301
*/
295
302
template <typename ... Args> self_type ¬e_v (Severity severity, std::string_view fmt, std::tuple<Args...> const &args);
296
303
@@ -300,6 +307,8 @@ class Errata {
300
307
* @param args Arguments for values in @a fmt.
301
308
* @return A reference to this object.
302
309
*
310
+ * The severity is updated to @a severity if the latter is set and more severe.
311
+ *
303
312
* This the effective implementation method for all variadic styles of the @a note method.
304
313
*/
305
314
template <typename ... Args>
@@ -405,6 +414,9 @@ class Errata {
405
414
// / The code for the top message.
406
415
code_type const &code () const ;
407
416
417
+ // / Set the @a code for @a this.
418
+ self_type & assign (code_type code);
419
+
408
420
// / Number of messages in the errata.
409
421
size_t length () const ;
410
422
@@ -916,6 +928,11 @@ Errata::code() const -> code_type const & {
916
928
return this ->empty () ? DEFAULT_CODE : _data->_code ;
917
929
}
918
930
931
+ inline auto Errata::assign (code_type code) -> self_type & {
932
+ this ->data ()->_code = code;
933
+ return *this ;
934
+ }
935
+
919
936
inline auto
920
937
Errata::severity () const -> Severity {
921
938
return _data ? _data->_severity : DEFAULT_SEVERITY;
0 commit comments