folly::to_integral

Wraps the argument for integral conversion.

Synopsis

Declared in <folly/Utility.h>

template<
    typename...,
    typename Src>
constexpr
to_integral_convertible<Src>
to_integral(Src const& src) noexcept;

NOTE

This function is defined as an Algorithm Function Object (AFO).

Return Value

A to_integral_convertible holding the value.

Parameters

NameDescription
srcThe floating-point value to wrap.