Author
anonymous
about 7 years ago
Language
C++
Compiler
clang HEAD 7.0.0 (https://github.com/llvm-mirror/clang.git 505903c4d00516897e296b023bc1b9b3b3db31fc) (https://github.com/llvm-mirror/llvm.git f20c58e01be06debe1700225b76d80d807bed9e1)
Options
Warnings
Boost 1.66.0
C++2a(GNU)
no pedantic
Author
anonymous
about 7 years ago
$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.66.0/clang-head/include -std=gnu++2a
prog.cc:6:17: error: no matching constructor for initialization of 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >')
std::string dest(src.data(), end);
^ ~~~~~~~~~~~~~~~
/opt/wandbox/clang-head/include/c++/v1/string:786:5: note: candidate constructor not viable: no known conversion from 'const char *' to 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::size_type' (aka 'unsigned long') for 2nd argument; dereference the argument with *
basic_string(const _CharT* __s, size_type __n);
^
/opt/wandbox/clang-head/include/c++/v1/string:796:5: note: candidate constructor not viable: no known conversion from 'const char *' to 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::size_type' (aka 'unsigned long') for 2nd argument; dereference the argument with *
basic_string(const basic_string& __str, size_type __pos,
^
/opt/wandbox/clang-head/include/c++/v1/string:790:5: note: candidate constructor not viable: no known conversion from 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::value_type *' (aka 'char *') to 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::size_type' (aka 'unsigned long') for 1st argument; dereference the argument with *
basic_string(size_type __n, _CharT __c);
^
/opt/wandbox/clang-head/include/c++/v1/string:784:5: note: candidate constructor not viable: no known conversion from 'const char *' to 'const std::__1::allocator<char>' for 2nd argument
basic_string(const _CharT* __s, const _Allocator& __a);
^
/opt/wandbox/clang-head/include/c++/v1/string:780:5: note: candidate constructor not viable: no known conversion from 'const char *' to 'const std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::allocator_type' (aka 'const std::__1::allocator<char>') for 2nd argument
basic_string(basic_string&& __str, const allocator_type& __a);
^
/opt/wandbox/clang-head/include/c++/v1/string:768:5: note: candidate constructor not viable: no known conversion from 'const char *' to 'const std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::allocator_type' (aka 'const std::__1::allocator<char>') for 2nd argument
basic_string(const basic_string& __str, const allocator_type& __a);
^
/opt/wandbox/clang-head/include/c++/v1/string:806:5: note: candidate constructor not viable: no known conversion from 'const char *' to 'const std::__1::allocator<char>' for 2nd argument
basic_string(__self_view __sv, const _Allocator& __a);
^
/opt/wandbox/clang-head/include/c++/v1/string:817:5: note: candidate constructor not viable: no known conversion from 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::value_type *' (aka 'char *') to 'initializer_list<char>' for 1st argument
basic_string(initializer_list<_CharT> __il, const _Allocator& __a);
^
/opt/wandbox/clang-head/include/c++/v1/string:809:9: note: candidate template ignored: deduced conflicting types for parameter '_InputIterator' ('char *' vs. 'const char *')
basic_string(_InputIterator __first, _InputIterator __last);
^
/opt/wandbox/clang-head/include/c++/v1/string:800:9: note: candidate constructor template not viable: requires at least 3 arguments, but 2 were provided
basic_string(const _Tp& __t, size_type __pos, size_type __n,
^
/opt/wandbox/clang-head/include/c++/v1/string:812:9: note: candidate constructor template not viable: requires 3 arguments, but 2 were provided
basic_string(_InputIterator __first, _InputIterator __last, const allocator_type& __a);
^
/opt/wandbox/clang-head/include/c++/v1/string:760:40: note: candidate constructor not viable: requires single argument '__a', but 2 arguments were provided
_LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a)
^
/opt/wandbox/clang-head/include/c++/v1/string:767:5: note: candidate constructor not viable: requires single argument '__str', but 2 arguments were provided
basic_string(const basic_string& __str);
^
/opt/wandbox/clang-head/include/c++/v1/string:772:5: note: candidate constructor not viable: requires single argument '__str', but 2 arguments were provided
basic_string(basic_string&& __str)
^
/opt/wandbox/clang-head/include/c++/v1/string:782:31: note: candidate constructor not viable: requires single argument '__s', but 2 arguments were provided
_LIBCPP_INLINE_VISIBILITY basic_string(const _CharT* __s);
^
/opt/wandbox/clang-head/include/c++/v1/string:804:5: note: candidate constructor not viable: requires single argument '__sv', but 2 arguments were provided
basic_string(__self_view __sv);
^
/opt/wandbox/clang-head/include/c++/v1/string:815:5: note: candidate constructor not viable: requires single argument '__il', but 2 arguments were provided
basic_string(initializer_list<_CharT> __il);
^
/opt/wandbox/clang-head/include/c++/v1/string:788:5: note: candidate constructor not viable: requires 3 arguments, but 2 were provided
basic_string(const _CharT* __s, size_type __n, const _Allocator& __a);
^
/opt/wandbox/clang-head/include/c++/v1/string:792:5: note: candidate constructor not viable: requires 3 arguments, but 2 were provided
basic_string(size_type __n, _CharT __c, const _Allocator& __a);
^
/opt/wandbox/clang-head/include/c++/v1/string:757:31: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
_LIBCPP_INLINE_VISIBILITY basic_string()
^
/opt/wandbox/clang-head/include/c++/v1/string:793:5: note: candidate constructor not viable: requires at least 3 arguments, but 2 were provided
basic_string(const basic_string& __str, size_type __pos, size_type __n,
^
1 error generated.
Exit Code:
1