You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
no matching function for call to 'replace(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, char, const value_type&)'
#2
Open
powervan opened this issue
Mar 7, 2022
· 2 comments
· May be fixed by #3
I have the following error : change compiler CXX =$(BINPREF)g++ -std=gnu++11 $ (M_ARCH) to$(BINPREF)g++ -std=gnu++17 $ (M_ARCH).
CXX =
Message:
g++ -Iinclude -O2 -fPIC -std=c++17 -Wall -c -o obj/dic/variable_descriptor.o src/dic/variable_descriptor.cpp
src/dic/variable_descriptor.cpp: In static member function 'static std::optionalRedatam::VariableDescriptor::Declaration Redatam::VariableDescriptor::Declaration::fromDeclarationString(const string&)':
src/dic/variable_descriptor.cpp:22:69: error: no matching function for call to 'replace(std::__cxx11::basic_string::iterator, std::__cxx11::basic_string::iterator, char, const value_type&)'
std::replace(begin(p), end(p), '\', fs::path::preferred_separator);
^
In file included from C:/rtools40/mingw64/include/c++/8.3.0/algorithm:62,
from C:/rtools40/mingw64/include/c++/8.3.0/regex:38,
from src/dic/variable_descriptor.cpp:3:
C:/rtools40/mingw64/include/c++/8.3.0/bits/stl_algo.h:4362:5: note: candidate: 'template<class _FIter, class _Tp> void std::replace(_FIter, _FIter, const _Tp&, const _Tp&)'
replace(_ForwardIterator __first, _ForwardIterator __last,
^~~~~~~
C:/rtools40/mingw64/include/c++/8.3.0/bits/stl_algo.h:4362:5: note: template argument deduction/substitution failed:
src/dic/variable_descriptor.cpp:22:69: note: deduced conflicting types for parameter 'const _Tp' ('char' and 'std::experimental::filesystem::v1::__cxx11::path::value_type' {aka 'wchar_t'})
std::replace(begin(p), end(p), '\', fs::path::preferred_separator);
^
make: *** [Makefile:27: obj/dic/variable_descriptor.o] Error 1
The text was updated successfully, but these errors were encountered: