index check in std::array

Michael Buro michael.buro@gmail.com
Tue Oct 30 16:16:00 GMT 2012


Gabriel Dos Reis writes:

...

 > 
 > Techically, you would get an ODR violation unless
 > you set NDEBUG consistently in all translation units.
 > 
 > Use at().

at() always checks for violations, which may be too often. If after
testing I become convinced that my code is correct, I don't want to
pay for index checks anymore.

/Michael



More information about the Libstdc++ mailing list