MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / circular_less_than

Function circular_less_than

Source/ThirdParty/concurrentqueue.h:317–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

315
316 template<typename T>
317 static inline bool circular_less_than(T a, T b)
318 {
319#ifdef _MSC_VER
320#pragma warning(push)
321#pragma warning(disable: 4554)
322#endif
323 static_assert(std::is_integral<T>::value && !std::numeric_limits<T>::is_signed, "circular_less_than is intended to be used only with unsigned integer types");
324 return static_cast<T>(a - b) > static_cast<T>(static_cast<T>(1) << static_cast<T>(sizeof(T) * CHAR_BIT - 1));
325#ifdef _MSC_VER
326#pragma warning(pop)
327#endif
328 }
329
330 template<typename U>
331 static inline char* align_for(char* ptr)

Callers 2

size_approxMethod · 0.70
~ImplicitProducerMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected