Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 6 years ago

Language

C++

Compiler

clang HEAD 9.0.0 (https://github.com/llvm-mirror/clang.git fd40bdf2995aef31cc236544c00aa41b3b7e04d9) (https://github.com/llvm-mirror/llvm.git 594d5b198e4b881dae6cc99c997ac3c87fd54fb9)

Options
Warnings
Boost 1.70.0
C++2a(GNU)
no pedantic

Author

anonymous

about 6 years ago

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/clang-head/include -std=gnu++2a
prog.cc:11:12: error: no viable conversion from returned value of type 'span<const std::byte, [...]>' to function return type 'span<std::byte, [...]>'
    return as_bytes(span0);
           ^~~~~~~~~~~~~~~
/opt/wandbox/clang-head/include/c++/v1/span:375:15: note: candidate constructor not viable: no known conversion from 'decltype(__s.__as_bytes())' (aka 'span<const std::byte, dynamic_extent>') to 'const std::__1::span<std::byte, 18446744073709551615> &' for 1st argument
    constexpr span           (const span&) noexcept = default;
              ^
/opt/wandbox/clang-head/include/c++/v1/span:383:15: note: candidate template ignored: could not match 'std::__1::span<std::byte, 18446744073709551615>::element_type [_Sz]' against 'decltype(__s.__as_bytes())' (aka 'span<const std::byte, dynamic_extent>')
    constexpr span(element_type (&__arr)[_Sz])          noexcept : __data{__arr}, __size{_Sz} {}
              ^
/opt/wandbox/clang-head/include/c++/v1/span:387:15: note: candidate template ignored: could not match 'array' against 'span'
    constexpr span(array<value_type, _Sz>& __arr)       noexcept : __data{__arr.data()}, __size{_Sz} {}
              ^
/opt/wandbox/clang-head/include/c++/v1/span:391:15: note: candidate template ignored: could not match 'array' against 'span'
    constexpr span(const array<value_type, _Sz>& __arr) noexcept : __data{__arr.data()}, __size{_Sz} {}
              ^
/opt/wandbox/clang-head/include/c++/v1/span:395:19: note: candidate template ignored: requirement '__is_span_compatible_container<std::__1::span<const std::byte, 18446744073709551615>, std::byte, void>::value' was not satisfied [with _Container = std::__1::span<const std::byte, 18446744073709551615>]
        constexpr span(      _Container& __c,
                  ^
/opt/wandbox/clang-head/include/c++/v1/span:401:19: note: candidate template ignored: requirement '__is_span_compatible_container<const std::__1::span<const std::byte, 18446744073709551615>, std::byte, void>::value' was not satisfied [with _Container = std::__1::span<const std::byte, 18446744073709551615>]
        constexpr span(const _Container& __c,
                  ^
/opt/wandbox/clang-head/include/c++/v1/span:408:19: note: candidate template ignored: requirement 'is_convertible_v<std::byte const (*)[], std::byte (*)[]>' was not satisfied [with _OtherElementType = const std::byte, _OtherExtent = 18446744073709551615]
        constexpr span(const span<_OtherElementType, _OtherExtent>& __other,
                  ^
1 error generated.
Exit Code:
1