Overload of implicit_cast() for view types (such as std::string_view), which participates in overload resolution when To is a non‐reference view type.

Synopsis

Declared in <absl/base/casts.h>

template<typename To>
constexpr
To
implicit_cast(To to)
requires type_traits_internal::IsView<std::enable_if_t<!std::is_reference_v<To>,
                                                  std::remove_cv_t<To>>>::value;

Return Value

The value of to, converted to To.

Parameters

Name

Description

to

The value to convert to To.

Created with MrDocs