| 467 | |
| 468 | template<typename T> |
| 469 | static inline bool circular_less_than(T a, T b) |
| 470 | { |
| 471 | #ifdef _MSC_VER |
| 472 | #pragma warning(push) |
| 473 | #pragma warning(disable: 4554) |
| 474 | #endif |
| 475 | 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"); |
| 476 | return static_cast<T>(a - b) > static_cast<T>(static_cast<T>(1) << static_cast<T>(sizeof(T) * CHAR_BIT - 1)); |
| 477 | #ifdef _MSC_VER |
| 478 | #pragma warning(pop) |
| 479 | #endif |
| 480 | } |
| 481 | |
| 482 | template<typename U> |
| 483 | static inline char* align_for(char* ptr) |
no outgoing calls
no test coverage detected