matplotplusplus
matplotplusplus copied to clipboard
custom marker errors in line_spec.cpp
Bug category
- [x] bug - compilation error
- [ ] bug - compilation warning
- [ ] bug - runtime error
- [ ] bug - runtime warning
- [ ] bug - logic error
Describe the bug
Impossibility to compile library using c++23
Steps to Reproduce
- Clone master branch in your cmake project using c++23
- Complete library setup
- Run compilation
Output
/home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:76:34: error: no match for ‘operator=’ (operand types are ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} and ‘const char8_t [4]’)
76 | custom_marker_ = u8"â–¶";
| ^~~~~
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from /home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:5:
/usr/include/c++/11/bits/basic_string.h:799:8: note: candidate: ‘template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _Tp&) [with _Tp = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
799 | operator=(const _Tp& __svt)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:799:8: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/move.h:57,
from /usr/include/c++/11/bits/nested_exception.h:40,
from /usr/include/c++/11/exception:154,
from /usr/include/c++/11/ios:39,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from /home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:5:
/usr/include/c++/11/type_traits: In substitution of ‘template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = std::__cxx11::basic_string<char>&]’:
/usr/include/c++/11/bits/basic_string.h:125:8: required by substitution of ‘template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using _If_sv = std::enable_if_t<std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value, _Res> [with _Tp = char8_t [4]; _Res = std::__cxx11::basic_string<char>&; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
/usr/include/c++/11/bits/basic_string.h:799:8: required by substitution of ‘template<class _Tp> std::__cxx11::basic_string<char>::_If_sv<_Tp, std::__cxx11::basic_string<char>&> std::__cxx11::basic_string<char>::operator=<_Tp>(const _Tp&) [with _Tp = char8_t [4]]’
/home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:76:34: required from here
/usr/include/c++/11/type_traits:2585:11: error: no type named ‘type’ in ‘struct std::enable_if<false, std::__cxx11::basic_string<char>&>’
2585 | using enable_if_t = typename enable_if<_Cond, _Tp>::type;
| ^~~~~~~~~~~
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from /home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:5:
/usr/include/c++/11/bits/basic_string.h:679:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
679 | operator=(const basic_string& __str)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:679:37: note: no known conversion for argument 1 from ‘const char8_t [4]’ to ‘const std::__cxx11::basic_string<char>&’
679 | operator=(const basic_string& __str)
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/11/bits/basic_string.h:689:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ (near match)
689 | operator=(const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:689:7: note: conversion of argument 1 would be ill-formed:
/home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:76:34: error: invalid conversion from ‘const char8_t*’ to ‘const char*’ [-fpermissive]
76 | custom_marker_ = u8"â–¶";
| ^~~~~
| |
| const char8_t*
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from /home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:5:
/usr/include/c++/11/bits/basic_string.h:700:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ (near match)
700 | operator=(_CharT __c)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:700:7: note: conversion of argument 1 would be ill-formed:
/home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:76:34: error: invalid conversion from ‘const char8_t*’ to ‘char’ [-fpermissive]
76 | custom_marker_ = u8"â–¶";
| ^~~~~
| |
| const char8_t*
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from /home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:5:
/usr/include/c++/11/bits/basic_string.h:717:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
717 | operator=(basic_string&& __str)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:717:32: note: no known conversion for argument 1 from ‘const char8_t [4]’ to ‘std::__cxx11::basic_string<char>&&’
717 | operator=(basic_string&& __str)
| ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/11/bits/basic_string.h:785:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
785 | operator=(initializer_list<_CharT> __l)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:785:42: note: no known conversion for argument 1 from ‘const char8_t [4]’ to ‘std::initializer_list<char>’
785 | operator=(initializer_list<_CharT> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:80:34: error: no match for ‘operator=’ (operand types are ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} and ‘const char8_t [4]’)
80 | custom_marker_ = u8"â—€";
| ^~~~~
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from /home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:5:
/usr/include/c++/11/bits/basic_string.h:799:8: note: candidate: ‘template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _Tp&) [with _Tp = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
799 | operator=(const _Tp& __svt)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:799:8: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/basic_string.h:679:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
679 | operator=(const basic_string& __str)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:679:37: note: no known conversion for argument 1 from ‘const char8_t [4]’ to ‘const std::__cxx11::basic_string<char>&’
679 | operator=(const basic_string& __str)
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/11/bits/basic_string.h:689:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ (near match)
689 | operator=(const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:689:7: note: conversion of argument 1 would be ill-formed:
/home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:80:34: error: invalid conversion from ‘const char8_t*’ to ‘const char*’ [-fpermissive]
80 | custom_marker_ = u8"â—€";
| ^~~~~
| |
| const char8_t*
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from /home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:5:
/usr/include/c++/11/bits/basic_string.h:700:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ (near match)
700 | operator=(_CharT __c)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:700:7: note: conversion of argument 1 would be ill-formed:
/home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:80:34: error: invalid conversion from ‘const char8_t*’ to ‘char’ [-fpermissive]
80 | custom_marker_ = u8"â—€";
| ^~~~~
| |
| const char8_t*
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from /home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:5:
/usr/include/c++/11/bits/basic_string.h:717:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
717 | operator=(basic_string&& __str)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:717:32: note: no known conversion for argument 1 from ‘const char8_t [4]’ to ‘std::__cxx11::basic_string<char>&&’
717 | operator=(basic_string&& __str)
| ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/11/bits/basic_string.h:785:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
785 | operator=(initializer_list<_CharT> __l)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:785:42: note: no known conversion for argument 1 from ‘const char8_t [4]’ to ‘std::initializer_list<char>’
785 | operator=(initializer_list<_CharT> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp: In member function ‘void matplot::line_spec::marker_style(std::string_view)’:
/home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:392:30: error: no match for ‘operator=’ (operand types are ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} and ‘const char8_t [4]’)
392 | custom_marker_ = u8"â–¶";
| ^~~~~
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from /home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:5:
/usr/include/c++/11/bits/basic_string.h:799:8: note: candidate: ‘template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _Tp&) [with _Tp = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
799 | operator=(const _Tp& __svt)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:799:8: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/basic_string.h:679:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
679 | operator=(const basic_string& __str)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:679:37: note: no known conversion for argument 1 from ‘const char8_t [4]’ to ‘const std::__cxx11::basic_string<char>&’
679 | operator=(const basic_string& __str)
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/11/bits/basic_string.h:689:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ (near match)
689 | operator=(const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:689:7: note: conversion of argument 1 would be ill-formed:
/home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:392:30: error: invalid conversion from ‘const char8_t*’ to ‘const char*’ [-fpermissive]
392 | custom_marker_ = u8"â–¶";
| ^~~~~
| |
| const char8_t*
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from /home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:5:
/usr/include/c++/11/bits/basic_string.h:700:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ (near match)
700 | operator=(_CharT __c)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:700:7: note: conversion of argument 1 would be ill-formed:
/home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:392:30: error: invalid conversion from ‘const char8_t*’ to ‘char’ [-fpermissive]
392 | custom_marker_ = u8"â–¶";
| ^~~~~
| |
| const char8_t*
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from /home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:5:
/usr/include/c++/11/bits/basic_string.h:717:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
717 | operator=(basic_string&& __str)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:717:32: note: no known conversion for argument 1 from ‘const char8_t [4]’ to ‘std::__cxx11::basic_string<char>&&’
717 | operator=(basic_string&& __str)
| ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/11/bits/basic_string.h:785:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
785 | operator=(initializer_list<_CharT> __l)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:785:42: note: no known conversion for argument 1 from ‘const char8_t [4]’ to ‘std::initializer_list<char>’
785 | operator=(initializer_list<_CharT> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:396:30: error: no match for ‘operator=’ (operand types are ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} and ‘const char8_t [4]’)
396 | custom_marker_ = u8"â—€";
| ^~~~~
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from /home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:5:
/usr/include/c++/11/bits/basic_string.h:799:8: note: candidate: ‘template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _Tp&) [with _Tp = _Tp; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
799 | operator=(const _Tp& __svt)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:799:8: note: template argument deduction/substitution failed:
/usr/include/c++/11/bits/basic_string.h:679:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
679 | operator=(const basic_string& __str)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:679:37: note: no known conversion for argument 1 from ‘const char8_t [4]’ to ‘const std::__cxx11::basic_string<char>&’
679 | operator=(const basic_string& __str)
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/11/bits/basic_string.h:689:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ (near match)
689 | operator=(const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:689:7: note: conversion of argument 1 would be ill-formed:
/home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:396:30: error: invalid conversion from ‘const char8_t*’ to ‘const char*’ [-fpermissive]
396 | custom_marker_ = u8"â—€";
| ^~~~~
| |
| const char8_t*
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from /home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:5:
/usr/include/c++/11/bits/basic_string.h:700:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ (near match)
700 | operator=(_CharT __c)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:700:7: note: conversion of argument 1 would be ill-formed:
/home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:396:30: error: invalid conversion from ‘const char8_t*’ to ‘char’ [-fpermissive]
396 | custom_marker_ = u8"â—€";
| ^~~~~
| |
| const char8_t*
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from /home/ebalo/Desktop/Projects/c++/seo_report_generator/libraries/matplotplusplus/source/matplot/core/line_spec.cpp:5:
/usr/include/c++/11/bits/basic_string.h:717:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
717 | operator=(basic_string&& __str)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:717:32: note: no known conversion for argument 1 from ‘const char8_t [4]’ to ‘std::__cxx11::basic_string<char>&&’
717 | operator=(basic_string&& __str)
| ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/11/bits/basic_string.h:785:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’
785 | operator=(initializer_list<_CharT> __l)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:785:42: note: no known conversion for argument 1 from ‘const char8_t [4]’ to ‘std::initializer_list<char>’
785 | operator=(initializer_list<_CharT> __l)
Platform
- [x] cross-platform issue - linux
- [ ] cross-platform issue - windows
- [ ] cross-platform issue - macos
Environment Details:
- OS: Ubuntu
- OS Version: 22.04
- Compiler: gcc
- Compiler version: 11.2.0
Additional context
A feasible fix will be removing the type u8
before each of the strings at lines 76, 80, 392 and 396.
If welcome I'll make a PR.
Yes. They're different types. u8
/char8_t
is unsigned and a different opaque type. It didn't even exist when this library was written. I'm not about the best conventions to support char8_t
throughout the library yet.