Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ g++ -std=c++17 main2.cpp -lstdc++fs -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic
- main2.cpp: In function ‘void parseJsonFile(const std::filesystem::__cxx11::path&, std::vector<std::__cxx11::basic_string<char> >&)’:
- main2.cpp:257:63: error: no matching function for call to ‘regex_replace(std::string&, std::__cxx11::regex&, std::__cxx11::regex&)’
- 257 | std::regex_replace(word, format, desiredFormat);
- | ^
- In file included from /usr/include/c++/9/regex:62,
- from main2.cpp:86:
- /usr/include/c++/9/bits/regex.h:2365:5: note: candidate: ‘template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type, class _St, class _Sa> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::__cxx11::basic_regex<_Ch_type, _Rx_traits>&, const std::__cxx11::basic_string<_Ch_type, _St, _Sa>&, std::regex_constants::match_flag_type)’
- 2365 | regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
- | ^~~~~~~~~~~~~
- /usr/include/c++/9/bits/regex.h:2365:5: note: template argument deduction/substitution failed:
- main2.cpp:257:63: note: candidate expects 6 arguments, 3 provided
- 257 | std::regex_replace(word, format, desiredFormat);
- | ^
- In file included from /usr/include/c++/9/bits/regex.h:2870,
- from /usr/include/c++/9/regex:62,
- from main2.cpp:86:
- /usr/include/c++/9/bits/regex.tcc:465:5: note: candidate: ‘template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::__cxx11::basic_regex<_Ch_type, _Rx_traits>&, const _Ch_type*, std::regex_constants::match_flag_type)’
- 465 | regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
- | ^~~~~~~~~~~~~
- /usr/include/c++/9/bits/regex.tcc:465:5: note: template argument deduction/substitution failed:
- main2.cpp:257:63: note: candidate expects 6 arguments, 3 provided
- 257 | std::regex_replace(word, format, desiredFormat);
- | ^
- In file included from /usr/include/c++/9/regex:62,
- from main2.cpp:86:
- /usr/include/c++/9/bits/regex.h:2410:5: note: candidate: ‘template<class _Rx_traits, class _Ch_type, class _St, class _Sa, class _Fst, class _Fsa> std::__cxx11::basic_string<_Ch_type, _St, _Sa> std::regex_replace(const std::__cxx11::basic_string<_Ch_type, _St, _Sa>&, const std::__cxx11::basic_regex<_Ch_type, _Rx_traits>&, const std::__cxx11::basic_string<_Ch_type, _Fst, _Fsa>&, std::regex_constants::match_flag_type)’
- 2410 | regex_replace(const basic_string<_Ch_type, _St, _Sa>& __s,
- | ^~~~~~~~~~~~~
- /usr/include/c++/9/bits/regex.h:2410:5: note: template argument deduction/substitution failed:
- main2.cpp:257:63: note: ‘std::__cxx11::regex’ {aka ‘std::__cxx11::basic_regex<char>’} is not derived from ‘const std::__cxx11::basic_string<_Ch_type, _Fst, _Fsa>’
- 257 | std::regex_replace(word, format, desiredFormat);
- | ^
- In file included from /usr/include/c++/9/regex:62,
- from main2.cpp:86:
- /usr/include/c++/9/bits/regex.h:2436:5: note: candidate: ‘template<class _Rx_traits, class _Ch_type, class _St, class _Sa> std::__cxx11::basic_string<_Ch_type, _St, _Sa> std::regex_replace(const std::__cxx11::basic_string<_Ch_type, _St, _Sa>&, const std::__cxx11::basic_regex<_Ch_type, _Rx_traits>&, const _Ch_type*, std::regex_constants::match_flag_type)’
- 2436 | regex_replace(const basic_string<_Ch_type, _St, _Sa>& __s,
- | ^~~~~~~~~~~~~
- /usr/include/c++/9/bits/regex.h:2436:5: note: template argument deduction/substitution failed:
- main2.cpp:257:63: note: mismatched types ‘const _Ch_type*’ and ‘std::__cxx11::basic_regex<char>’
- 257 | std::regex_replace(word, format, desiredFormat);
- | ^
- In file included from /usr/include/c++/9/regex:62,
- from main2.cpp:86:
- /usr/include/c++/9/bits/regex.h:2462:5: note: candidate: ‘template<class _Rx_traits, class _Ch_type, class _St, class _Sa> std::__cxx11::basic_string<_Ch_type> std::regex_replace(const _Ch_type*, const std::__cxx11::basic_regex<_Ch_type, _Rx_traits>&, const std::__cxx11::basic_string<_Ch_type, _St, _Sa>&, std::regex_constants::match_flag_type)’
- 2462 | regex_replace(const _Ch_type* __s,
- | ^~~~~~~~~~~~~
- /usr/include/c++/9/bits/regex.h:2462:5: note: template argument deduction/substitution failed:
- main2.cpp:257:63: note: mismatched types ‘const _Ch_type*’ and ‘std::__cxx11::basic_string<char>’
- 257 | std::regex_replace(word, format, desiredFormat);
- | ^
- In file included from /usr/include/c++/9/regex:62,
- from main2.cpp:86:
- /usr/include/c++/9/bits/regex.h:2488:5: note: candidate: ‘template<class _Rx_traits, class _Ch_type> std::__cxx11::basic_string<_Ch_type> std::regex_replace(const _Ch_type*, const std::__cxx11::basic_regex<_Ch_type, _Rx_traits>&, const _Ch_type*, std::regex_constants::match_flag_type)’
- 2488 | regex_replace(const _Ch_type* __s,
- | ^~~~~~~~~~~~~
- /usr/include/c++/9/bits/regex.h:2488:5: note: template argument deduction/substitution failed:
- main2.cpp:257:63: note: mismatched types ‘const _Ch_type*’ and ‘std::__cxx11::basic_string<char>’
- 257 | std::regex_replace(word, format, desiredFormat);
- | ^
- main2.cpp:215:77: warning: unused parameter ‘alphaNums’ [-Wunused-parameter]
- 215 | void parseJsonFile(const fs::path &inputFilePath, std::vector<std::string> &alphaNums) {
- |
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement