Author
anonymous
over 4 years ago
Language
C++
Compiler
gcc HEAD 11.0.1 20210304 (experimental)
Options
Warnings
Boost 1.73.0
C++2b(GNU)
no pedantic
Author
anonymous
over 4 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-head/include -std=gnu++2b
prog.cc: In function 'int main()':
prog.cc:6:22: error: static assertion failed
6 | static_assert(std::indirectly_writable<std::vector<bool>::iterator, bool>);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:6:22: note: constraints not satisfied
In file included from /opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_iterator_base_types.h:71,
from /opt/wandbox/gcc-head/include/c++/11.0.1/bits/stl_algobase.h:65,
from /opt/wandbox/gcc-head/include/c++/11.0.1/bits/char_traits.h:39,
from /opt/wandbox/gcc-head/include/c++/11.0.1/ios:40,
from /opt/wandbox/gcc-head/include/c++/11.0.1/ostream:38,
from /opt/wandbox/gcc-head/include/c++/11.0.1/iostream:39,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/iterator_concepts.h:541:13: required by the constraints of 'template<class _Out, class _Tp> concept std::indirectly_writable'
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/iterator_concepts.h:541:35: in requirements with '_Out&& __o', '_Tp&& __t' [with _Tp = bool; _Out = std::_Bit_iterator]
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/iterator_concepts.h:546:11: note: the required expression 'const_cast<const decltype(*(declval<_Tp&>)())&&>(*__o) =(forward<_Tp>)(__t)' is invalid
545 | const_cast<const iter_reference_t<_Out>&&>(*__o)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
546 | = std::forward<_Tp>(__t);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/11.0.1/bits/iterator_concepts.h:548:11: note: the required expression 'const_cast<const decltype(*(declval<_Tp&>)())&&>(*(forward<_Out>)(__o))=(forward<_Tp>)(__t)' is invalid
547 | const_cast<const iter_reference_t<_Out>&&>(*std::forward<_Out>(__o))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
548 | = std::forward<_Tp>(__t);
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: note: set '-fconcepts-diagnostics-depth=' to at least 2 for more detail
Exit Code:
1