Ookii.CommandLine for C++  2.0.0
command_line_builder.h
Go to the documentation of this file.
1 #ifndef OOKII_COMMAND_LINE_BUILDER_H_
6 #define OOKII_COMMAND_LINE_BUILDER_H_
7 
8 #pragma once
9 
10 #include "command_line_parser.h"
11 
12 namespace ookii
13 {
14  namespace details
15  {
16  template <typename Ret, typename Arg, typename... Rest>
17  Arg first_argument_helper(Ret (*)(Arg, Rest...));
18 
19  template <typename Ret, typename F, typename Arg, typename... Rest>
20  Arg first_argument_helper(Ret (F::*)(Arg, Rest...));
21 
22  template <typename Ret, typename F, typename Arg, typename... Rest>
23  Arg first_argument_helper(Ret (F::*)(Arg, Rest...) const);
24 
25  template <typename F>
26  decltype(first_argument_helper(&F::operator())) first_argument_helper(F);
27 
28  template <typename T>
29  using first_argument_type = decltype(first_argument_helper(std::declval<T>()));
30 
31 #ifdef _WIN32
32  template<typename CharType>
33  inline void show_win32_version()
34  {
35  auto info = details::get_version_resource();
36  if (!info)
37  {
38  console_stream<CharType>::cout() << "Unknown version." << std::endl;
39  return;
40  }
41 
42  console_stream<CharType>::cout() << info->product_name << " " << info->version << std::endl;
43  if (!info->copyright.empty())
44  {
45  console_stream<CharType>::cout() << info->copyright << std::endl;
46  }
47  }
48 #endif
49  }
50 
71  template<typename CharType = details::default_char_type, typename Traits = std::char_traits<CharType>, typename Alloc = std::allocator<CharType>>
73  {
74  using parser_storage_type = details::parser_storage<CharType, Traits, Alloc>;
75  using creation_options_type = details::creation_options<CharType, Traits, Alloc>;
76 
77  public:
87  using version_function = std::function<void()>;
88 
91  template<typename T>
93 
96  template<typename T>
98 
100 
101  template<typename T>
102  class argument_builder;
103 
104  template<typename T>
106 
107  template<typename T>
109 
114  {
115  using storage_type = typename argument_base_type::storage_type;
116 
117  public:
119  virtual ~argument_builder_base() = default;
120 
123  argument_builder_base &operator=(argument_builder_base &) = delete;
124 
126  template<typename T>
128  {
129  return _parser_builder.add_argument(value, name);
130  }
131 
133  template<typename T>
135  {
136  return _parser_builder.add_argument(value, short_name);
137  }
138 
140  template<typename Action>
142  {
143  return _parser_builder.add_action_argument(action, name);
144  }
145 
147  template<typename Action>
149  {
150  return _parser_builder.add_action_argument(action, short_name);
151  }
152 
154  template<typename T>
156  {
157  return _parser_builder.add_multi_value_argument(value, name);
158  }
159 
161  template<typename T>
163  {
164  return _parser_builder.add_multi_value_argument(value, short_name);
165  }
166 
169  {
170  return _parser_builder.add_version_argument(function);
171  }
172 
173 #if defined(_WIN32) || defined(DOXYGEN)
176  {
177  return _parser_builder.add_win32_version_argument();
178  }
179 #endif
180 
183  {
184  return _parser_builder.build();
185  }
186 
188  const string_type &name() const noexcept
189  {
190  return _storage.name;
191  }
192 
194  const CharType &short_name() const noexcept
195  {
196  return _storage.short_name;
197  }
198 
202  virtual std::unique_ptr<argument_base_type> to_argument(parser_type &parser) = 0;
203 
204  protected:
209  : _storage{name},
210  _parser_builder{basic_parser_builder}
211  {
212  }
213 
218  : _storage{string_type{short_name}},
219  _parser_builder{basic_parser_builder}
220  {
221  _storage.short_name = short_name;
222  _storage.has_long_name = false;
223  }
224 
226  storage_type &storage()
227  {
228  return _storage;
229  }
230 
233  {
234  return _parser_builder.get_next_position();
235  }
236 
237  private:
238  storage_type _storage;
239  basic_parser_builder &_parser_builder;
240  };
241 
247  template<typename BuilderType>
249  {
250  public:
252 
259  BuilderType &name(string_type name)
260  {
261  this->storage().name = name;
262  this->storage().has_long_name = true;
263  return *static_cast<BuilderType*>(this);
264  }
265 
271  BuilderType &short_name()
272  {
273  this->storage().short_name = this->storage().name[0];
274  return *static_cast<BuilderType*>(this);
275  }
276 
281  BuilderType &short_name(CharType short_name)
282  {
283  this->storage().short_name = short_name;
284  return *static_cast<BuilderType*>(this);
285  }
286 
288  const string_type &name() const noexcept
289  {
291  }
292 
294  const CharType &short_name() const noexcept
295  {
297  }
298 
320  {
321  this->storage().value_description = value_description;
322  return *static_cast<BuilderType*>(this);
323  }
324 
335  {
336  this->storage().description = description;
337  return *static_cast<BuilderType*>(this);
338  }
339 
349  BuilderType &positional()
350  {
351  if (!this->storage().position)
352  {
353  this->storage().position = this->get_next_position();
354  }
355 
356  return *static_cast<BuilderType*>(this);
357  }
358 
365  BuilderType &required()
366  {
367  this->storage().is_required = true;
368  return *static_cast<BuilderType*>(this);
369  }
370 
383  BuilderType &alias(string_type alias)
384  {
385  this->storage().aliases.push_back(alias);
386  return *static_cast<BuilderType*>(this);
387  }
388 
397  BuilderType &short_alias(CharType alias)
398  {
399  this->storage().short_aliases.push_back(alias);
400  return *static_cast<BuilderType*>(this);
401  }
402 
415  BuilderType &cancel_parsing()
416  {
417  this->storage().cancel_parsing = true;
418  return *static_cast<BuilderType*>(this);
419  }
420  };
421 
428  template<typename ArgumentType, typename BuilderType>
430  {
432  using typed_storage_type = typename ArgumentType::typed_storage_type;
433  using value_type = typename ArgumentType::value_type;
434  using element_type = typename ArgumentType::element_type;
435  using converter_type = typename typed_storage_type::converter_type;
436 
437  public:
444  _typed_storage{value}
445  {
446  }
447 
454  _typed_storage{value}
455  {
456  }
457 
472  BuilderType &default_value(element_type default_value)
473  {
474  this->_typed_storage.default_value = default_value;
475  return *static_cast<BuilderType*>(this);
476  }
477 
488  BuilderType &converter(converter_type converter)
489  {
490  this->_typed_storage.converter = converter;
491  return *static_cast<BuilderType*>(this);
492  }
493 
494  private:
495  virtual std::unique_ptr<argument_base_type> to_argument(parser_type &parser) override
496  {
497  if (this->storage().value_description.empty())
499 
500  return make_unique<ArgumentType>(parser, std::move(this->storage()), std::move(_typed_storage));
501  }
502 
503  typed_storage_type _typed_storage;
504  };
505 
508  template<typename T>
509  class argument_builder final : public typed_argument_builder<typed_argument_type<T>, argument_builder<T>>
510  {
512 
513  public:
514  using base_type::base_type;
515  };
516 
519  template<typename T>
520  class multi_value_argument_builder final : public typed_argument_builder<multi_value_argument_type<T>, multi_value_argument_builder<T>>
521  {
523 
524  public:
525  using base_type::base_type;
526 
541  {
542  this->storage().multi_value_separator = separator;
543  return *this;
544  }
545  };
546 
549  template<typename T>
550  class action_argument_builder final : public argument_builder_common<action_argument_builder<T>>
551  {
554  using typed_storage_type = typename argument_type::typed_storage_type;
555  using value_type = typename argument_type::value_type;
556  using element_type = typename argument_type::element_type;
557  using converter_type = typename typed_storage_type::converter_type;
558 
559  public:
562 
569  _typed_storage{action}
570  {
571  }
572 
579  _typed_storage{action}
580  {
581  }
582 
585  {
586  this->_typed_storage.converter = converter;
587  return *this;
588  }
589 
590  private:
591  virtual std::unique_ptr<argument_base_type> to_argument(parser_type &parser) override
592  {
593  if (this->storage().value_description.empty())
595 
596  return make_unique<argument_type>(parser, std::move(this->storage()), std::move(_typed_storage));
597  }
598 
599  typed_storage_type _typed_storage;
600  };
601 
607  basic_parser_builder(string_type command_name, const string_provider_type *string_provider = nullptr)
608  : _storage{command_name, string_provider}
609  {
610  }
611 
643  template<typename T>
645  {
646  _arguments.push_back(std::make_unique<argument_builder<T>>(*this, name, value));
647  return *static_cast<argument_builder<T>*>(_arguments.back().get());
648  }
649 
665  template<typename T>
666  argument_builder<T> &add_argument(T &value, CharType short_name)
667  {
668  _arguments.push_back(std::make_unique<argument_builder<T>>(*this, short_name, value));
669  return *static_cast<argument_builder<T>*>(_arguments.back().get());
670  }
671 
695  template<typename Action>
697  {
699  _arguments.push_back(std::make_unique<argument_type>(*this, name, action));
700  return *static_cast<argument_type*>(_arguments.back().get());
701  }
702 
716  template<typename Action>
718  {
720  _arguments.push_back(std::make_unique<argument_type>(*this, short_name, action));
721  return *static_cast<argument_type*>(_arguments.back().get());
722  }
723 
738  template<typename T>
740  {
741  _arguments.push_back(std::make_unique<multi_value_argument_builder<T>>(*this, name, value));
742  return *static_cast<multi_value_argument_builder<T>*>(_arguments.back().get());
743  }
744 
760  template<typename T>
762  {
763  _arguments.push_back(std::make_unique<multi_value_argument_builder<T>>(*this, short_name, value));
764  return *static_cast<multi_value_argument_builder<T>*>(_arguments.back().get());
765  }
766 
783  {
784  if (_version_argument != nullptr)
785  {
786  throw std::logic_error("Duplicate version argument.");
787  }
788 
789  auto action = [function = std::move(function)](bool, parser_type &)
790  {
791  function();
792  // Cancel parsing without requesting help.
793  return false;
794  };
795 
796  auto &argument = add_action_argument(action, _storage.string_provider->automatic_version_name())
797  .description(_storage.string_provider->automatic_version_description());
798 
799  _version_argument = &argument;
800  return argument;
801  }
802 
803 #if defined(_WIN32) || defined(DOXYGEN)
823  {
824  return add_version_argument(details::show_win32_version<CharType>);
825  }
826 #endif
827 
835  {
836  if (_storage.prefixes.empty())
837  _storage.prefixes = parser_type::get_default_prefixes();
838 
839  if (_storage.mode == parsing_mode::long_short)
840  {
841  if (_storage.long_prefix.empty())
842  {
843  _storage.long_prefix = c_default_long_prefix.data();
844  }
845  }
846  else
847  {
848  _storage.long_prefix.clear();
849  }
850 
851  // If there is a version argument, try to match its case to other arguments.
852  if (_version_argument != nullptr)
853  {
854  auto it = std::find_if(_arguments.begin(), _arguments.end(), [this](auto &item) { return item.get() != _version_argument; });
855  if (it != _arguments.end())
856  {
857  auto name = _version_argument->name();
858  if (std::isupper((*it)->name()[0], _storage.locale))
859  {
860  name[0] = std::toupper(name[0], _storage.locale);
861  }
862  else
863  {
864  name[0] = std::tolower(name[0], _storage.locale);
865  }
866 
867  _version_argument->name(name);
868  }
869  }
870 
871  return parser_type{_arguments, std::move(_storage), _options};
872  }
873 
885  {
886  _options.case_sensitive = case_sensitive;
887  return *this;
888  }
889 
895  basic_parser_builder &locale(std::locale loc)
896  {
897  _storage.locale = loc;
898  return *this;
899  }
900 
905  {
906  if (mode < parsing_mode::default_mode || mode > parsing_mode::long_short)
907  {
908  throw std::invalid_argument("mode");
909  }
910 
911  _storage.mode = mode;
912  return *this;
913  }
914 
929  template<typename Range>
931  {
932  // Using enables ADL.
933  using std::begin;
934  using std::end;
935  _storage.prefixes = std::vector<string_type>{ begin(prefixes), end(prefixes) };
936  return *this;
937  }
938 
951  template<typename T>
952  basic_parser_builder &prefixes(std::initializer_list<T> prefixes)
953  {
954  return this->prefixes<std::initializer_list<T>>(prefixes);
955  }
956 
965  {
966  _storage.long_prefix = prefix;
967  return *this;
968  }
969 
982  {
983  _storage.allow_white_space_separator = allow;
984  return *this;
985  }
986 
999  {
1000  _storage.allow_duplicate_arguments = allow;
1001  return *this;
1002  }
1003 
1015  basic_parser_builder &argument_value_separator(CharType separator) noexcept
1016  {
1017  _storage.argument_value_separator = separator;
1018  return *this;
1019  }
1020 
1027  {
1028  _storage.description = description;
1029  return *this;
1030  }
1031 
1050  {
1051  _options.automatic_help_argument = enable;
1052  return *this;
1053  }
1054 
1064  {
1065  _storage.show_usage_on_error = request;
1066  return *this;
1067  }
1068 
1069  private:
1070  size_t get_next_position() noexcept
1071  {
1072  return _next_position++;
1073  }
1074 
1075  std::vector<std::unique_ptr<argument_builder_base>> _arguments;
1076  size_t _next_position{};
1077  action_argument_builder<bool> *_version_argument{};
1078 
1079  creation_options_type _options{};
1080  parser_storage_type _storage;
1081 
1082  static constexpr auto c_default_long_prefix = literal_cast<CharType>("--");
1083  };
1084 
1089 
1090 }
1091 
1092 #endif
Class that provides information about action arguments.
Definition: command_line_argument.h:700
details::action_argument_storage< value_type, CharType, Traits, Alloc > typed_storage_type
The concrete type of argument information storage used. For internal use.
Definition: command_line_argument.h:716
T value_type
The type of the argument's value, which equals T.
Definition: command_line_argument.h:705
typename typed_storage_type::function_type function_type
The type of the function used by this action argument.
Definition: command_line_argument.h:718
T element_type
The type of the argument's elements, which equals T.
Definition: command_line_argument.h:710
Parses command line arguments into strongly-typed values.
Definition: command_line_parser.h:106
command_line_argument_base< CharType, Traits, Alloc > argument_base_type
The specialized type of command_line_argument_base used.
Definition: command_line_parser.h:109
static constexpr std::vector< string_type > get_default_prefixes()
Gets the default prefixes accepted by the parser.
Definition: command_line_parser.h:144
basic_localized_string_provider< CharType, Traits, Alloc > string_provider_type
The specialized type of basic_localized_string_provider used.
Definition: command_line_parser.h:125
typename argument_base_type::string_type string_type
The specialized type of std::basic_string used.
Definition: command_line_parser.h:111
Specifies options for an action argument.
Definition: command_line_builder.h:551
action_argument_builder(basic_parser_builder &parser_builder, CharType short_name, function_type action)
Initializes a new instance of the argument_builder class.
Definition: command_line_builder.h:577
action_argument_builder(basic_parser_builder &parser_builder, string_type name, function_type action)
Initializes a new instance of the argument_builder class.
Definition: command_line_builder.h:567
typename argument_type::function_type function_type
The type of function used for the action.
Definition: command_line_builder.h:561
action_argument_builder & converter(converter_type converter)
Supplies a custom function to convert strings to the argument's type.
Definition: command_line_builder.h:584
Abstract base class with common functionality for the argument builders.
Definition: command_line_builder.h:114
action_argument_builder< bool > & add_win32_version_argument()
Adds the standard version argument, using version information from the VERSIONINFO resource.
Definition: command_line_builder.h:175
argument_builder< T > & add_argument(T &value, CharType short_name)
Adds a new argument, and returns an argument_builder that can be used to further customize it.
Definition: command_line_builder.h:134
const CharType & short_name() const noexcept
Returns the short name of the argument.
Definition: command_line_builder.h:194
storage_type & storage()
Provides access to the argument's options storage.
Definition: command_line_builder.h:226
size_t get_next_position()
Gets the next position for a positional argument.
Definition: command_line_builder.h:232
parser_type build()
Creates a basic_command_line_parser using the current options and arguments.
Definition: command_line_builder.h:182
action_argument_builder< details::first_argument_type< Action > > & add_action_argument(Action action, string_type name)
Adds a new action argument.
Definition: command_line_builder.h:141
multi_value_argument_builder< T > & add_multi_value_argument(T &value, string_type name)
Adds a new multi-value argument.
Definition: command_line_builder.h:155
virtual ~argument_builder_base()=default
Default destructor.
action_argument_builder< bool > & add_version_argument(version_function function)
Adds the standard version argument.
Definition: command_line_builder.h:168
argument_builder_base(basic_parser_builder &basic_parser_builder, string_type name)
Initializes a new instance of the argument_builder_base class.
Definition: command_line_builder.h:208
multi_value_argument_builder< T > & add_multi_value_argument(T &value, CharType short_name)
Adds a new multi-value argument.
Definition: command_line_builder.h:162
argument_builder_base(argument_builder_base &)=delete
Deleted copy constructor.
argument_builder< T > & add_argument(T &value, string_type name)
Adds a new argument, and returns an argument_builder that can be used to further customize it.
Definition: command_line_builder.h:127
virtual std::unique_ptr< argument_base_type > to_argument(parser_type &parser)=0
Converts the argument_builder_base into a command_line_argument_base that can be used by the basic_co...
action_argument_builder< details::first_argument_type< Action > > & add_action_argument(Action action, CharType short_name)
Adds a new action argument.
Definition: command_line_builder.h:148
argument_builder_base(basic_parser_builder &basic_parser_builder, CharType short_name)
Initializes a new instance of the argument_builder_base class.
Definition: command_line_builder.h:217
const string_type & name() const noexcept
Returns the name of the argument.
Definition: command_line_builder.h:188
Specifies options common to all argument types, for an argument under construction.
Definition: command_line_builder.h:249
const CharType & short_name() const noexcept
Returns the short name of the argument.
Definition: command_line_builder.h:294
BuilderType & description(string_type description)
Sets the long description for the argument.
Definition: command_line_builder.h:334
BuilderType & short_name(CharType short_name)
Sets an explicit short name for an argument.
Definition: command_line_builder.h:281
BuilderType & short_alias(CharType alias)
Adds a short alias to the argument.
Definition: command_line_builder.h:397
BuilderType & alias(string_type alias)
Adds an alias to the argument.
Definition: command_line_builder.h:383
BuilderType & name(string_type name)
Changes the name of the argument.
Definition: command_line_builder.h:259
const string_type & name() const noexcept
Returns the name of the argument.
Definition: command_line_builder.h:288
BuilderType & cancel_parsing()
Indicates that supplying this argument will cancel parsing.
Definition: command_line_builder.h:415
BuilderType & required()
Indicates that the argument is required.
Definition: command_line_builder.h:365
BuilderType & value_description(string_type value_description)
Sets the value description for the argument.
Definition: command_line_builder.h:319
BuilderType & short_name()
Sets a short name for the argument that matches the first character of the long name.
Definition: command_line_builder.h:271
BuilderType & positional()
Indicates that the argument can be specified by position.
Definition: command_line_builder.h:349
Specifies options for an argument, other than a multi-value or action argument.
Definition: command_line_builder.h:510
Specified options for a multi-value argument.
Definition: command_line_builder.h:521
multi_value_argument_builder & separator(CharType separator)
Specifies a separator that separates multiple values in a single argument value.
Definition: command_line_builder.h:540
Specifies options for a regular or multi-value argument under construction.
Definition: command_line_builder.h:430
typed_argument_builder(basic_parser_builder &basic_parser_builder, CharType short_name, value_type &value)
Initializes a new instance of the argument_builder class.
Definition: command_line_builder.h:452
BuilderType & converter(converter_type converter)
Supplies a custom function to convert strings to the argument's type.
Definition: command_line_builder.h:488
typed_argument_builder(basic_parser_builder &basic_parser_builder, string_type name, value_type &value)
Initializes a new instance of the argument_builder class.
Definition: command_line_builder.h:442
BuilderType & default_value(element_type default_value)
Sets a default value for the argument, which will be used if the argument is not supplied....
Definition: command_line_builder.h:472
Provides functionality to specify options and arguments to create a new basic_command_line_parser.
Definition: command_line_builder.h:73
basic_parser_builder & mode(parsing_mode mode)
Sets the command line parsing rules to use.
Definition: command_line_builder.h:904
basic_parser_builder & prefixes(const Range &prefixes)
Sets the argument name prefixes accepted by the basic_command_line_parser.
Definition: command_line_builder.h:930
argument_builder< T > & add_argument(T &value, CharType short_name)
Adds a new argument, and returns an argument_builder that can be used to further customize it.
Definition: command_line_builder.h:666
basic_parser_builder & allow_whitespace_separator(bool allow) noexcept
Sets a value that indicates whether argument names and values can be separated by whitespace.
Definition: command_line_builder.h:981
basic_parser_builder & allow_duplicate_arguments(bool allow) noexcept
Sets a value that indicates whether arguments may be specified multiple times.
Definition: command_line_builder.h:998
multi_value_argument_builder< T > & add_multi_value_argument(T &value, string_type name)
Adds a new multi-value argument.
Definition: command_line_builder.h:739
std::function< void()> version_function
The function type used by the add_version_argument function.
Definition: command_line_builder.h:87
basic_parser_builder & argument_value_separator(CharType separator) noexcept
Sets the character used to separate argument names and values.
Definition: command_line_builder.h:1015
basic_parser_builder & case_sensitive(bool case_sensitive) noexcept
Sets a value that indicates whether argument names are case sensitive.
Definition: command_line_builder.h:884
basic_parser_builder & locale(std::locale loc)
Sets the locale to use when converting argument values and writing usage help.
Definition: command_line_builder.h:895
basic_parser_builder & description(string_type description)
Sets a description for the application.
Definition: command_line_builder.h:1026
basic_parser_builder & show_usage_on_error(usage_help_request request)
Sets a value that indicates how usage is shown after a parsing error occurred.
Definition: command_line_builder.h:1063
action_argument_builder< bool > & add_win32_version_argument()
Adds the standard version argument, using version information from the VERSIONINFO resource.
Definition: command_line_builder.h:822
typename parser_type::argument_base_type argument_base_type
The specialized type of command_line_argument_base used.
Definition: command_line_builder.h:83
action_argument_builder< details::first_argument_type< Action > > & add_action_argument(Action action, CharType short_name)
Adds a new action argument.
Definition: command_line_builder.h:717
typename parser_type::string_provider_type string_provider_type
The specialized type of basic_localized_string_provider used.
Definition: command_line_builder.h:85
action_argument_builder< details::first_argument_type< Action > > & add_action_argument(Action action, string_type name)
Adds a new action argument.
Definition: command_line_builder.h:696
action_argument_builder< bool > & add_version_argument(version_function function)
Adds the standard version argument.
Definition: command_line_builder.h:782
argument_builder< T > & add_argument(T &value, string_type name)
Adds a new argument, and returns an argument_builder that can be used to further customize it.
Definition: command_line_builder.h:644
basic_parser_builder & prefixes(std::initializer_list< T > prefixes)
Sets the argument name prefixes accepted by the basic_command_line_parser.
Definition: command_line_builder.h:952
basic_parser_builder(string_type command_name, const string_provider_type *string_provider=nullptr)
Initializes a new instance of the basic_parser_builder class.
Definition: command_line_builder.h:607
basic_parser_builder & automatic_help_argument(bool enable)
Set a value that indicates whether to create an automatic help argument.
Definition: command_line_builder.h:1049
multi_value_argument_builder< T > & add_multi_value_argument(T &value, CharType short_name)
Adds a new multi-value argument.
Definition: command_line_builder.h:761
typename parser_type::string_type string_type
The specialized type of std::basic_string used.
Definition: command_line_builder.h:81
basic_parser_builder & long_prefix(string_type prefix)
Sets the long argument name prefix accepted by the basic_command_line_parser.
Definition: command_line_builder.h:964
parser_type build()
Creates a basic_command_line_parser using the current options and arguments.
Definition: command_line_builder.h:834
Class that provides information about arguments that are not multi-value arguments.
Definition: command_line_argument.h:432
Class that provides information about arguments that are not multi-value arguments.
Definition: command_line_argument.h:554
Provides the ookii::basic_command_line_parser class.
Namespace containing the core Ookii.CommandLine.Cpp types.
Definition: command_line_argument.h:16
usage_help_request
Indicates if and how usage is shown if an error occurred parsing the command line.
Definition: usage_writer.h:26
parsing_mode
Indicates what argument parsing rules should be used to interpret the command line.
Definition: parsing_mode.h:14
@ long_short
Use POSIX-like rules where arguments have separate long and short names.
Template used to specify the default value description for a type.
Definition: value_description.h:30
static std::basic_string< CharType, Traits, Alloc > get()
Gets the value description for the type.
Definition: value_description.h:32