Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 7 years ago

Language

Compiler

Options

Author

anonymous

over 7 years ago

$
prog.cc:13:24: error: no matching constructor for initialization of 'std::vector<int>'
    Something(U&& u) : vec(std::forward<U>(u)) {}
                       ^   ~~~~~~~~~~~~~~~~~~
prog.cc:31:26: note: in instantiation of function template specialization 'Something::Something<std::__1::basic_string<char> >' requested here
        auto something = Something{std::string{"qwerty"}};
                         ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:482:40: note: candidate constructor not viable: no known conversion from 'std::__1::basic_string<char>' to 'const allocator_type' (aka 'const std::__1::allocator<int>') for 1st argument
    _LIBCPP_INLINE_VISIBILITY explicit vector(const allocator_type& __a)
                                       ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:494:14: note: candidate constructor not viable: no known conversion from 'std::__1::basic_string<char>' to 'size_type' (aka 'unsigned long') for 1st argument
    explicit vector(size_type __n);
             ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:530:5: note: candidate constructor not viable: no known conversion from 'std::__1::basic_string<char>' to 'initializer_list<value_type>' (aka 'initializer_list<int>') for 1st argument
    vector(initializer_list<value_type> __il);
    ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:542:5: note: candidate constructor not viable: no known conversion from 'std::__1::basic_string<char>' to 'const std::__1::vector<int, std::__1::allocator<int> >' for 1st argument
    vector(const vector& __x);
    ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:548:5: note: candidate constructor not viable: no known conversion from 'std::__1::basic_string<char>' to 'std::__1::vector<int, std::__1::allocator<int> >' for 1st argument
    vector(vector&& __x)
    ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:501:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
        vector(_InputIterator __first,
        ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:509:9: note: candidate constructor template not viable: requires at least 3 arguments, but 1 was provided
        vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
        ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:516:9: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
        vector(_ForwardIterator __first,
        ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:523:9: note: candidate constructor template not viable: requires at least 3 arguments, but 1 was provided
        vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a,
        ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:476:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
    vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
    ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:496:14: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    explicit vector(size_type __n, const allocator_type& __a);
             ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:498:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    vector(size_type __n, const_reference __x);
    ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:532:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    vector(initializer_list<value_type> __il, const allocator_type& __a);
    ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:543:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    vector(const vector& __x, const allocator_type& __a);
    ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:555:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    vector(vector&& __x, const allocator_type& __a);
    ^
/opt/wandbox/clang-4.0.1/include/c++/v1/vector:499:5: note: candidate constructor not viable: requires 3 arguments, but 1 was provided
    vector(size_type __n, const_reference __x, const allocator_type& __a);
    ^
1 error generated.
Exit Code:
1