| 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) |
no outgoing calls
no test coverage detected