flatten overloads

Synopses

Declared in <bdldfp_decimalutil.h>

Return a temporary bsl::string constructed from the specified stringRef.

static
bsl::string
flatten(bslstl::StringRef const& stringRef);

Return the result of invoking 'c_str()' on the specified 'string'.

static
char const*
flatten(bsl::string const& string);

Same as the related overload above for flatten.

static
char const*
flatten(std::pmr::string const& string);

Same as the overload taking bsl::string.

static
char const*
flatten(std::string const& string);

Same as the related overload above for flatten.

static
char const*
flatten(char* cString);

Return the specified cString.

static
char const*
flatten(char const* cString);

Produce a compile‐time error informing the caller that the parameterized TYPE is not supported as the parameter for the call.

template<class TYPE>
static
char const*
flatten(TYPE const& value);

Return Value

  • temporary bsl::string constructed from stringRef

  • result of invoking c_str() on string

  • cString unchanged

  • never returns; produces a compile‐time error

Parameters

Name

Description

stringRef

string reference used to build a temporary string

string

string whose c_str() result is returned

cString

null‐terminated C string to return unchanged

value

unsupported argument used only to select this overload

Created with MrDocs