|
protectednoexcept |
A template function performing a construction of the class template instantiation.
CharType | is a type of the description to be set which is either char or wchar_t . |
GetDescriptionFn | is a type of the function object mapping the specified platform error code to the corresponding description. The default-constructed objects of the type should support the parentheses operator receiving a numeric error code of the platform_code_t type as its only parameter and mapping it to the corresponding wide string description. The latter can be represented as a C pointer to a zero-terminated wide string copied into the internal buffers or as a managed unique pointer to the wide C string, such as [std::unique_ptr] or Chusov::String::AutoCString, or as an [std::basic_string] object. The returned object can be empty in order to specify an error condition. |
[in] | nPlatformCode | is a numeric value of the platform specific error code to be handled by the constructed object. |
[in] | fnGetDescription | is a universal reference to a function object of the GetDescriptionFn type, which is used to map the error code to the corresponding wide string description. |
[in] | ap | is a variable argument list used during formatting using the rules defined for the Chusov::String::Printf function. |
[in] | pszDescription | is a wide-string defining the format of the description to be associated with the error code. At first, the formatting is performed according to the rules defined for the Chusov::String::Printf function. The result of this operation is also processed to replace the tags in angle brackets with the corresponding text, as specified for the PlatformException class template. |