jbattini / fast-cpp-csv-parser

Automatically exported from code.google.com/p/fast-cpp-csv-parser
0 stars 0 forks source link

has_column syntax issue #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create an io::CSVReader<8, io::trim_chars<>, io::no_quote_escape<','>, 
io::throw_on_overflow, io::no_comment>
2. call read_header(io::ignore_missing_column, ...) on the above instance, 
passing eight strings
3. attempt to compile program

What is the expected output? What do you see instead?
The code should compile and run as expected; instead, a compile error is thrown 
with the following text:

.../csv_v2.h:942:71: error: member reference base type 'std::string const[8]' 
is not a structure or union
                                             - std::begin(column_names.begin));
                                                          ~~~~~~~~~~~~^~~~~~

What version of the product are you using? On what operating system?
csv_v2.h initial commit, XCode 4.6.2, OSX 10.8.4, default project configuration 
(Apple LLVM compiler 4.2, GNU99 C dialect, GNU++11 C++ dialect)

Please provide any additional information below.

The issue only occurred when has_column was called in the program, and was 
resolved by changing the code of has_column to

    return  col_order.end() != std::find(
                    col_order.begin(),
                    col_order.end(),
                    std::find( std::begin(column_names), std::end(column_names), name) - std::begin(column_names));

as per 
http://stackoverflow.com/questions/14595285/cannot-use-begin-or-end-on-an-array

Original issue reported on code.google.com by ardvarti...@gmail.com on 6 Jun 2013 at 10:57

GoogleCodeExporter commented 8 years ago
Thanks for the bug report. I incorporated the changes you suggested.

PS: The reason why this simple bug fix was not done for nearly 2 months is that 
google code did not send me a notification email about your bug report....

Original comment by strasser...@gmail.com on 23 Jul 2013 at 5:56

GoogleCodeExporter commented 8 years ago
setting to done

Original comment by strasser...@gmail.com on 8 Apr 2014 at 1:51