https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125492
Bug ID: 125492
Summary: [reflection] Misleading error message when
`std::meta::size_of` is applied to a reflected
function type
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ensadc at mailnesia dot com
Target Milestone: ---
https://gcc.godbolt.org/z/7Y1ePaM1h
====
#include <meta>
constexpr auto a = std::meta::size_of(^^void());
====
<source>:3:47: error: uncaught exception of type 'std::meta::exception';
'what()': 'reflection with incomplete type in size_of'
3 | constexpr auto a = std::meta::size_of(^^void());
| ^
====
The error message does not make sense: `void()` is not an incomplete type; it's
a function type.