QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#117442 | #13. Router | ZhangYiDe | Compile Error | / | / | C++20 | 19.8kb | 2023-07-01 10:15:30 | 2023-07-01 10:15:33 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code: In member function ‘void RegExp::init() const’: answer.code:573:41: error: no match for ‘operator=’ (operand types are ‘const regex’ {aka ‘const std::__cxx11::basic_regex<char>’} and ‘std::__cxx11::regex’ {aka ‘std::__cxx11::basic_regex<char>’}) 573 | this->regex=std::regex(plain.c_str()); | ^ In file included from /usr/include/c++/11/regex:63, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110, from answer.code:1: /usr/include/c++/11/bits/regex.h:574:9: note: candidate: ‘template<class _Ch_traits, class _Alloc> std::__cxx11::basic_regex< <template-parameter-1-1>, <template-parameter-1-2> >& std::__cxx11::basic_regex< <template-parameter-1-1>, <template-parameter-1-2> >::operator=(const std::__cxx11::basic_string<_Ch_type, _Ch_traits, _Ch_alloc>&) [with _Ch_traits = _Ch_traits; _Alloc = _Alloc; _Ch_type = char; _Rx_traits = std::__cxx11::regex_traits<char>]’ 574 | operator=(const basic_string<_Ch_type, _Ch_traits, _Alloc>& __s) | ^~~~~~~~ /usr/include/c++/11/bits/regex.h:574:9: note: template argument deduction/substitution failed: answer.code:573:41: note: ‘std::__cxx11::regex’ {aka ‘std::__cxx11::basic_regex<char>’} is not derived from ‘const std::__cxx11::basic_string<char, _Ch_traits, _Ch_alloc>’ 573 | this->regex=std::regex(plain.c_str()); | ^ In file included from /usr/include/c++/11/regex:63, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110, from answer.code:1: /usr/include/c++/11/bits/regex.h:533:7: note: candidate: ‘std::__cxx11::basic_regex< <template-parameter-1-1>, <template-parameter-1-2> >& std::__cxx11::basic_regex< <template-parameter-1-1>, <template-parameter-1-2> >::operator=(const std::__cxx11::basic_regex< <template-parameter-1-1>, <template-parameter-1-2> >&) [with _Ch_type = char; _Rx_traits = std::__cxx11::regex_traits<char>]’ (near match) 533 | operator=(const basic_regex& __rhs) | ^~~~~~~~ /usr/include/c++/11/bits/regex.h:533:7: note: passing ‘const regex*’ {aka ‘const std::__cxx11::basic_regex<char>*’} as ‘this’ argument discards qualifiers /usr/include/c++/11/bits/regex.h:540:7: note: candidate: ‘std::__cxx11::basic_regex< <template-parameter-1-1>, <template-parameter-1-2> >& std::__cxx11::basic_regex< <template-parameter-1-1>, <template-parameter-1-2> >::operator=(std::__cxx11::basic_regex< <template-parameter-1-1>, <template-parameter-1-2> >&&) [with _Ch_type = char; _Rx_traits = std::__cxx11::regex_traits<char>]’ (near match) 540 | operator=(basic_regex&& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/11/bits/regex.h:540:7: note: passing ‘const regex*’ {aka ‘const std::__cxx11::basic_regex<char>*’} as ‘this’ argument discards qualifiers /usr/include/c++/11/bits/regex.h:551:7: note: candidate: ‘std::__cxx11::basic_regex< <template-parameter-1-1>, <template-parameter-1-2> >& std::__cxx11::basic_regex< <template-parameter-1-1>, <template-parameter-1-2> >::operator=(const _Ch_type*) [with _Ch_type = char; _Rx_traits = std::__cxx11::regex_traits<char>]’ 551 | operator=(const _Ch_type* __p) | ^~~~~~~~ /usr/include/c++/11/bits/regex.h:551:33: note: no known conversion for argument 1 from ‘std::__cxx11::regex’ {aka ‘std::__cxx11::basic_regex<char>’} to ‘const char*’ 551 | operator=(const _Ch_type* __p) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/11/bits/regex.h:563:7: note: candidate: ‘std::__cxx11::basic_regex< <template-parameter-1-1>, <template-parameter-1-2> >& std::__cxx11::basic_regex< <template-parameter-1-1>, <template-parameter-1-2> >::operator=(std::initializer_list<_Tp>) [with _Ch_type = char; _Rx_traits = std::__cxx11::regex_traits<char>]’ 563 | operator=(initializer_list<_Ch_type> __l) | ^~~~~~~~ /usr/include/c++/11/bits/regex.h:563:44: note: no known conversion for argument 1 from ‘std::__cxx11::regex’ {aka ‘std::__cxx11::basic_regex<char>’} to ‘std::initializer_list<char>’ 563 | operator=(initializer_list<_Ch_type> __l) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~