csv2 icon indicating copy to clipboard operation
csv2 copied to clipboard

How to solve problem? error: no matching function for call to.

Open jhhe66 opened this issue 3 years ago • 2 comments

In file included from /tmp/tmp.RkhsHRAu07/main.cpp:2:0: /tmp/tmp.RkhsHRAu07/csv2/reader.hpp: In instantiation of ‘bool csv2::Reader<delimiter, quote_character, first_row_is_header, trim_policy>::mmap(StringType&&) [with StringType = const char (&)[8]; delimiter = csv2::delimiter<','>; quote_character = csv2::quote_character<'"'>; first_row_is_header = csv2::first_row_is_header; trim_policy = csv2::trim_policy::trim_characters<' ', '\011'>]’: /tmp/tmp.RkhsHRAu07/main.cpp:13:27: required from here /tmp/tmp.RkhsHRAu07/csv2/reader.hpp:24:11: error: no matching function for call to ‘mio::basic_mmap<(mio::access_mode)0, char>::basic_mmap(const char [8])’ mmap_ = mio::mmap_source(filename); ^ /tmp/tmp.RkhsHRAu07/csv2/reader.hpp:24:11: note: candidates are: In file included from /tmp/tmp.RkhsHRAu07/csv2/reader.hpp:4:0, from /tmp/tmp.RkhsHRAu07/main.cpp:2: /tmp/tmp.RkhsHRAu07/include/csv2/mio.hpp:216:3: note: mio::basic_mmap<AccessMode, ByteT>::basic_mmap(mio::basic_mmap<AccessMode, ByteT>&&) [with mio::access_mode AccessMode = (mio::access_mode)0; ByteT = char] basic_mmap(basic_mmap &&); ^ /tmp/tmp.RkhsHRAu07/include/csv2/mio.hpp:216:3: note: no known conversion for argument 1 from ‘const char [8]’ to ‘mio::basic_mmap<(mio::access_mode)0, char>&&’ /tmp/tmp.RkhsHRAu07/include/csv2/mio.hpp:178:3: note: mio::basic_mmap<AccessMode, ByteT>::basic_mmap() [with mio::access_mode AccessMode = (mio::access_mode)0; ByteT = char] basic_mmap() = default; ^ /tmp/tmp.RkhsHRAu07/include/csv2/mio.hpp:178:3: note: candidate expects 0 arguments, 1 provided gmake[3]: *** [CMakeFiles/TestReadBigFile.dir/main.o] Error 1 gmake[2]: *** [CMakeFiles/TestReadBigFile.dir/all] Error 2 gmake[1]: *** [CMakeFiles/TestReadBigFile.dir/rule] Error 2 gmake: *** [TestReadBigFile] Error 2

jhhe66 avatar Mar 15 '21 01:03 jhhe66

Hi jhhe66, do you have the source code available?

jusbar23 avatar Apr 02 '21 11:04 jusbar23

include "csv2.hpp" before , add #define __cpp_exceptions

huangshangbin avatar Apr 07 '21 02:04 huangshangbin