folly::constexpr_strcmp

Compares two null-terminated strings at compile time.

Synopsis

Declared in <folly/portability/Constexpr.h>

template<typename Char>
constexpr
int
constexpr_strcmp(
    Char const* s1,
    Char const* s2) noexcept;

Return Value

A negative, zero, or positive value if s1 orders before, equal to, or after s2.

Parameters

NameDescription
s1The first null-terminated string.
s2The second null-terminated string.