absl::Cord::Cord

Creates a Cord from a std::string&& rvalue.

Synopsis

Declared in <absl/strings/cord.h>

template<
    typename T,
    EnableIfString<T> = 0>
explicit
Cord(T&& src);

Description

These constructors are templated to avoid ambiguities for types that are convertible to both absl::string_view and std::string, such as const char*.

Template Parameters

NameDescription
TThe string type being consumed.

Parameters

NameDescription
srcThe string whose contents are moved into the Cord.