BIND 10 #2112: confusing initialization in for loops
BIND 10 Development
do-not-reply at isc.org
Sun Jul 1 09:03:45 UTC 2012
#2112: confusing initialization in for loops
-------------------------------------+-------------------------------------
Reporter: fdupont | Owner:
Type: enhancement | Status: new
Priority: medium | Milestone: New
Component: Unclassified | Tasks
Sensitive: 0 | Keywords:
Sub-Project: Core | Defect Severity: Low
Estimated Difficulty: 0 | Feature Depending on Ticket:
Total Hours: 0 | Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Microsoft C++ compilers complain about this style:
(from src/lib/datasrc/tests, file factory_unittest.cc)
{{{
for (const char** config(configs); *config; ++config) {
}}}
obviously they don't correctly infer the type of "config" and take it as a
function which can't be a left-value... IMHO it is better (and required
until all Microsoft compilers are fixed) to use:
{{{
for (const char** config = configs; *config; ++config) {
}}}
BTW it seems all the files with this confusing style are in this
directory.
--
Ticket URL: <http://bind10.isc.org/ticket/2112>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list