atcoder / ac-library

AtCoder Library
Creative Commons Zero v1.0 Universal
1.84k stars 236 forks source link

[refactor] adding assertion of underflow handling #138

Closed At-sushi closed 1 year ago

At-sushi commented 2 years ago

Features

The behavior of underflowing is well-defined (C99 7.15.1.1 §2) but I thought it is better to assert.

yosupo06 commented 1 year ago

Currently we don't plan to use assertion except to check constraints for user inputs.

If we add assertion to internal... probably we will introduce it together with #ifdef ATCODEDR_INTERNAL_DEBUG or something, but not determined yet.