Returns idx % capacity() If the buffer size is a power of two, binary arithmethics is used instead of modulo arithmetics */
| 272 | instead of modulo arithmetics |
| 273 | */ |
| 274 | size_t mod( size_t idx ) |
| 275 | { |
| 276 | constexpr_if ( c_bExp2 ) |
| 277 | return idx & ( capacity() - 1 ); |
| 278 | else |
| 279 | return idx % capacity(); |
| 280 | } |
| 281 | |
| 282 | //@cond |
| 283 | template <typename I> |
no outgoing calls
no test coverage detected