mirror of
https://github.com/boostorg/regex.git
synced 2025-07-29 12:07:28 +02:00
Can't declare a variable in a for-loop with the same name as a variable declared in the for loop initialization
[SVN r12775]
This commit is contained in:
@ -122,12 +122,12 @@ int main(int argc, const char** argv)
|
||||
cout << "Processing file " << argv[i] << endl;
|
||||
std::ifstream fs(argv[i]);
|
||||
load_file(text, fs);
|
||||
class_index i;
|
||||
i.IndexClasses(text);
|
||||
cout << i.get_map().size() << " matches found" << endl;
|
||||
class_index idx;
|
||||
idx.IndexClasses(text);
|
||||
cout << idx.get_map().size() << " matches found" << endl;
|
||||
map_type::iterator c, d;
|
||||
c = i.get_map().begin();
|
||||
d = i.get_map().end();
|
||||
c = idx.get_map().begin();
|
||||
d = idx.get_map().end();
|
||||
while(c != d)
|
||||
{
|
||||
cout << "class \"" << (*c).first << "\" found at index: " << (*c).second << endl;
|
||||
|
Reference in New Issue
Block a user