Advertisement
Guest User

Untitled

a guest
Oct 27th, 2019
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.94 KB | None | 0 0
  1. $ g++ -std=c++17 main2.cpp -lstdc++fs -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic
  2. main2.cpp: In function ‘void parseJsonFile(const std::filesystem::__cxx11::path&, std::vector<std::__cxx11::basic_string<char> >&):
  3. main2.cpp:257:63: error: no matching function for call to ‘regex_replace(std::string&, std::__cxx11::regex&, std::__cxx11::regex&)
  4.   257 |                 std::regex_replace(word, format, desiredFormat);
  5.       |                                                               ^
  6. In file included from /usr/include/c++/9/regex:62,
  7.                  from main2.cpp:86:
  8. /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)
  9.  2365 |     regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
  10.       |     ^~~~~~~~~~~~~
  11. /usr/include/c++/9/bits/regex.h:2365:5: note:   template argument deduction/substitution failed:
  12. main2.cpp:257:63: note:   candidate expects 6 arguments, 3 provided
  13.   257 |                 std::regex_replace(word, format, desiredFormat);
  14.       |                                                               ^
  15. In file included from /usr/include/c++/9/bits/regex.h:2870,
  16.                  from /usr/include/c++/9/regex:62,
  17.                  from main2.cpp:86:
  18. /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)
  19.   465 |     regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
  20.       |     ^~~~~~~~~~~~~
  21. /usr/include/c++/9/bits/regex.tcc:465:5: note:   template argument deduction/substitution failed:
  22. main2.cpp:257:63: note:   candidate expects 6 arguments, 3 provided
  23.   257 |                 std::regex_replace(word, format, desiredFormat);
  24.       |                                                               ^
  25. In file included from /usr/include/c++/9/regex:62,
  26.                  from main2.cpp:86:
  27. /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)
  28.  2410 |     regex_replace(const basic_string<_Ch_type, _St, _Sa>& __s,
  29.       |     ^~~~~~~~~~~~~
  30. /usr/include/c++/9/bits/regex.h:2410:5: note:   template argument deduction/substitution failed:
  31. 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>
  32.   257 |                 std::regex_replace(word, format, desiredFormat);
  33.       |                                                               ^
  34. In file included from /usr/include/c++/9/regex:62,
  35.                  from main2.cpp:86:
  36. /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)
  37.  2436 |     regex_replace(const basic_string<_Ch_type, _St, _Sa>& __s,
  38.       |     ^~~~~~~~~~~~~
  39. /usr/include/c++/9/bits/regex.h:2436:5: note:   template argument deduction/substitution failed:
  40. main2.cpp:257:63: note:   mismatched types ‘const _Ch_type*’ and ‘std::__cxx11::basic_regex<char>
  41.   257 |                 std::regex_replace(word, format, desiredFormat);
  42.       |                                                               ^
  43. In file included from /usr/include/c++/9/regex:62,
  44.                  from main2.cpp:86:
  45. /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)
  46.  2462 |     regex_replace(const _Ch_type* __s,
  47.       |     ^~~~~~~~~~~~~
  48. /usr/include/c++/9/bits/regex.h:2462:5: note:   template argument deduction/substitution failed:
  49. main2.cpp:257:63: note:   mismatched types ‘const _Ch_type*’ and ‘std::__cxx11::basic_string<char>
  50.   257 |                 std::regex_replace(word, format, desiredFormat);
  51.       |                                                               ^
  52. In file included from /usr/include/c++/9/regex:62,
  53.                  from main2.cpp:86:
  54. /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)
  55.  2488 |     regex_replace(const _Ch_type* __s,
  56.       |     ^~~~~~~~~~~~~
  57. /usr/include/c++/9/bits/regex.h:2488:5: note:   template argument deduction/substitution failed:
  58. main2.cpp:257:63: note:   mismatched types ‘const _Ch_type*’ and ‘std::__cxx11::basic_string<char>
  59.   257 |                 std::regex_replace(word, format, desiredFormat);
  60.       |                                                               ^
  61. main2.cpp:215:77: warning: unused parameter ‘alphaNums’ [-Wunused-parameter]
  62.   215 | void parseJsonFile(const fs::path &inputFilePath, std::vector<std::string> &alphaNums) {
  63.       |
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement