https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80016
Bug ID: 80016
Summary: error is positioned incorrectly
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: vanyacpp at gmail dot com
Target Milestone: ---
Created attachment 40955
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40955&action=edit
expr-loc-bug.cpp
Compilation of the attached file expr-loc-bug.cpp gives the following error
message:
expr-loc-bug.cpp:12:45: error: incomplete type
‘std::is_nothrow_move_constructible<any>’ used in nested name specifier
static constexpr bool fits_small_storage = sizeof(T) <=
INPLACE_STORAGE_SIZE
~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& alignof(T) <=
INPLACE_STORAGE_ALIGNMENT
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&&
std::is_nothrow_move_constructible<T>::value;
^~~~~~
The error message is about is_nothrow_move_constructible but the error range
spans unrelated expressions. Strangely enough it begins in the middle of sizeof
and it ends in the middle of is_nothrow_move_constructible.