|
Boost : |
Subject: [boost] [array] compile-time checked access
From: Tobias Loew (Tobias.Loew_at_[hidden])
Date: 2012-11-05 03:50:39
Hi,
I was just rewriting some old code with hard coded indices for array access
and though that compile-time checked access to array elements would be a
nice thing.
Maybe there are smart compilers out there that emit warnings or errors for a
hard coded out-of-bounds access, but my compiler does not.
So, code like
compiles without warnings or erros.
Now, adding the following functions to array
would make it possible to write
which results in the expected error messages.
Tobias
-- View this message in context: http://boost.2283326.n4.nabble.com/array-compile-time-checked-access-tp4638135.html Sent from the Boost - Dev mailing list archive at Nabble.com.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk