cannot convert initializer list argument to 'const std::array<char, 11>'
struct _LIBCPP_TEMPLATE_VIS array
^
;
main.cpp:37:96: error: reference to overloaded function could not be resolved; did you mean to call it?
std::cout « hello_world_printer('H', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd') « std::endl;
^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:1037:1: note: possible target for call
endl(basic_ostream<_CharT, _Traits>& __os)
^
main.cpp:37:5: warning: expression result unused [-Wunused-value]
std::cout « hello_world_printer('H', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd') « std::endl;
^~~~~~~~~
1 warning and 15 errors generated.
➜ experiment clang++ -std=c++20 -o test main.cpp
main.cpp:11:78: error: character <U+00BB> not allowed in an identifier
if constexpr (!std::is_integral_v < std::decay_t < _Sequence_Argument»)
^
main.cpp:26:135: error: unexpected character <U+00AB>
static constexpr void print_impl(std::basic_ostream<_Ch, _Tr> &ostream, const _Tuple &t, std::index_sequence<_Is...>) { ((ostream « (_Is == 0 ? "" : ", ") « std::get<_Is>(t.get())), ...); }
^~
main.cpp:26:161: error: unexpected character <U+00AB>
static constexpr void print_impl(std::basic_ostream<_Ch, _Tr> &ostream, const _Tuple &t, std::index_sequence<_Is...>) { ((ostream « (_Is == 0 ? "" : ", ") « std::get<_Is>(t.get())), ...); }
^~
main.cpp:11:60: error: unknown type name '_Sequence_Argument»'; did you mean '_Sequence_Argument'?
if constexpr (!std::is_integral_v < std::decay_t < _Sequence_Argument»)
^~~~~~~~~~~~~~~~~~~
_Sequence_Argument
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/array:152:29: note: candidate constructor (the implicit copy constructor) not viable: cannot convert initializer list argument to 'const std::array<char, 11>'
struct _LIBCPP_TEMPLATE_VIS array
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/array:152:29: note: candidate constructor (the implicit move constructor) not viable: cannot convert initializer list argument to 'std::array<char, 11>'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/array:152:29: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided
main.cpp:26:127: error: type 'std::basic_ostream<char, char_traits<char>>' does not provide a call operator
static constexpr void print_impl(std::basic_ostream<_Ch, _Tr> &ostream, const _Tuple &t, std::index_sequence<_Is...>) { ((ostream « (_Is == 0 ? "" : ", ") « std::get<_Is>(t.get())), ...); }
^~~~~~~
```
Вы действительно не поняли, что человек просто пошутил в ответ на ваш вопрос про «привет мир»?
Вы действительно не поняли, что я шучу ему в ответ?
Промелькнуло сомнение
Обсуждают сегодня