mirror of
https://github.com/boostorg/regex.git
synced 2025-07-30 20:47:21 +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;
|
cout << "Processing file " << argv[i] << endl;
|
||||||
std::ifstream fs(argv[i]);
|
std::ifstream fs(argv[i]);
|
||||||
load_file(text, fs);
|
load_file(text, fs);
|
||||||
class_index i;
|
class_index idx;
|
||||||
i.IndexClasses(text);
|
idx.IndexClasses(text);
|
||||||
cout << i.get_map().size() << " matches found" << endl;
|
cout << idx.get_map().size() << " matches found" << endl;
|
||||||
map_type::iterator c, d;
|
map_type::iterator c, d;
|
||||||
c = i.get_map().begin();
|
c = idx.get_map().begin();
|
||||||
d = i.get_map().end();
|
d = idx.get_map().end();
|
||||||
while(c != d)
|
while(c != d)
|
||||||
{
|
{
|
||||||
cout << "class \"" << (*c).first << "\" found at index: " << (*c).second << endl;
|
cout << "class \"" << (*c).first << "\" found at index: " << (*c).second << endl;
|
||||||
|
Reference in New Issue
Block a user