[Bug c++/109997] __is_assignable(int, IncompleteType) should be rejected
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri May 26 18:22:25 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109997
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
Last reconfirmed| |2023-05-26
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Same for std::is_constructible. So presumably we want something like
--- a/gcc/cp/method.cc
+++ b/gcc/cp/method.cc
@@ -2173,7 +2173,10 @@ constructible_expr (tree to, tree from)
static tree
is_xible_helper (enum tree_code code, tree to, tree from, bool trivial)
{
- to = complete_type (to);
+ to = complete_type_or_else (to, NULL_TREE);
+ from = complete_type_or_else (from, NULL_TREE);
+ if (!from || !to)
+ return error_mark_node;
deferring_access_check_sentinel acs (dk_no_deferred);
if (VOID_TYPE_P (to) || ABSTRACT_CLASS_TYPE_P (to)
|| (from && FUNC_OR_METHOD_TYPE_P (from)
but I'd have to test std::is_constructible with a parameter pack as well.
More information about the Gcc-bugs
mailing list