ClickHouse/libs/libcommon/include/common/likely.h

10 lines
195 B
C++

#pragma once
#if defined(_MSC_VER)
#define likely(x) (x)
#define unlikely(x) (x)
#else
#define likely(x) (__builtin_expect(!!(x), 1))
#define unlikely(x) (__builtin_expect(!!(x), 0))
#endif