Author
anonymous
almost 5 years ago
Language
Compiler
Options
Author
anonymous
almost 5 years ago
$
In file included from /opt/wandbox/gcc-head/include/c++/11.0.0/algorithm:61,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_algobase.h: In function 'int main()':
prog.cc:16:34: in 'constexpr' expansion of 'T{unsigned char [1]()}.S<1, unsigned char>::clear()'
prog.cc:8:20: in 'constexpr' expansion of 'std::fill_n<unsigned char*, int, unsigned char>(std::begin<unsigned char, 1>(((S<1, unsigned char>*)this)->S<1, unsigned char>::data), 1, 0)'
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_algobase.h:1085:29: in 'constexpr' expansion of 'std::__fill_n_a<unsigned char*, int, unsigned char>(__first, std::__size_to_integer(__n), (* & __value), (std::__iterator_category<unsigned char*>(__first), std::iterator_traits<unsigned char*>::iterator_category()))'
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_algobase.h:1056:20: error: 'constexpr void std::__fill_a(_FIte, _FIte, const _Tp&) [with _FIte = unsigned char*; _Tp = unsigned char]' called in a constant expression
1056 | std::__fill_a(__first, __first + __n, __value);
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_algobase.h:904:5: note: 'constexpr void std::__fill_a(_FIte, _FIte, const _Tp&) [with _FIte = unsigned char*; _Tp = unsigned char]' is not usable as a 'constexpr' function because:
904 | __fill_a(_FIte __first, _FIte __last, const _Tp& __value)
| ^~~~~~~~
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_algobase.h:905:21: error: call to non-'constexpr' function 'typename __gnu_cxx::__enable_if<std::__is_byte<_Tp>::__value, void>::__type std::__fill_a1(_Tp*, _Tp*, const _Tp&) [with _Tp = unsigned char; typename __gnu_cxx::__enable_if<std::__is_byte<_Tp>::__value, void>::__type = void]'
905 | { std::__fill_a1(__first, __last, __value); }
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/11.0.0/bits/stl_algobase.h:880:5: note: 'typename __gnu_cxx::__enable_if<std::__is_byte<_Tp>::__value, void>::__type std::__fill_a1(_Tp*, _Tp*, const _Tp&) [with _Tp = unsigned char; typename __gnu_cxx::__enable_if<std::__is_byte<_Tp>::__value, void>::__type = void]' declared here
880 | __fill_a1(_Tp* __first, _Tp* __last, const _Tp& __c)
| ^~~~~~~~~
prog.cc:17:29: error: non-constant condition for static assertion
17 | static_assert(b.data[0] == 0);
| ~~~~~~~~~~^~~~
Exit Code:
1