folly::compiler_must_not_predict

Marks t as unpredictable so the compiler cannot optimize on its value.

Synopsis

Declared in <folly/lang/Hint.h>

template<typename T>
void
compiler_must_not_predict(T& t) noexcept;

NOTE

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

Parameters

NameDescription
tThe value to treat as unpredictable.