Skip to content

make的时候报错啦,在centos7下面,为什么呢 #65

Description

@levsion

[ 50%] Building CXX object CMakeFiles/qmc-decoder.dir/src/decoder.cpp.o
/home/levsion/qmc-decoder-master/src/decoder.cpp: In function ‘void {anonymous}::sub_process(std::string)’:
/home/levsion/qmc-decoder-master/src/decoder.cpp:67:60: error: no matching function for call to ‘regex_replace(std::string&, const regex&, const char [5])’
auto mp3_outloc = regex_replace(outloc, mp3_regex, ".mp3");
^
/home/levsion/qmc-decoder-master/src/decoder.cpp:67:60: note: candidates are:
In file included from /usr/include/c++/4.8.2/regex:62:0,
from /home/levsion/qmc-decoder-master/src/decoder.cpp:13:
/usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
regex_replace(const basic_string<_Ch_type>& __s,
^
/usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template argument deduction/substitution failed:
/home/levsion/qmc-decoder-master/src/decoder.cpp:67:60: note: mismatched types ‘const std::basic_string<_Ch_type>’ and ‘const char [5]’
auto mp3_outloc = regex_replace(outloc, mp3_regex, ".mp3");
^
In file included from /usr/include/c++/4.8.2/regex:62:0,
from /home/levsion/qmc-decoder-master/src/decoder.cpp:13:
/usr/include/c++/4.8.2/bits/regex.h:2162:5: note: 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::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
^
/usr/include/c++/4.8.2/bits/regex.h:2162:5: note: template argument deduction/substitution failed:
/home/levsion/qmc-decoder-master/src/decoder.cpp:67:60: note: deduced conflicting types for parameter ‘_Bi_iter’ (‘std::basic_regex’ and ‘const char*’)
auto mp3_outloc = regex_replace(outloc, mp3_regex, ".mp3");
^
/home/levsion/qmc-decoder-master/src/decoder.cpp:68:63: error: no matching function for call to ‘regex_replace(std::string&, const regex&, const char [6])’
auto flac_outloc = regex_replace(outloc, flac_regex, ".flac");
^
/home/levsion/qmc-decoder-master/src/decoder.cpp:68:63: note: candidates are:
In file included from /usr/include/c++/4.8.2/regex:62:0,
from /home/levsion/qmc-decoder-master/src/decoder.cpp:13:
/usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
regex_replace(const basic_string<_Ch_type>& __s,
^
/usr/include/c++/4.8.2/bits/regex.h:2182:5: note: template argument deduction/substitution failed:
/home/levsion/qmc-decoder-master/src/decoder.cpp:68:63: note: mismatched types ‘const std::basic_string<_Ch_type>’ and ‘const char [6]’
auto flac_outloc = regex_replace(outloc, flac_regex, ".flac");
^

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions