mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-06 02:20:34 +08:00
re PR c++/55842 (C++11 ICE with boost multi-precision and boost variant)
PR c++/55842 * semantics.c (trait_expr_value): Call maybe_instantiate_noexcept. From-SVN: r194869
This commit is contained in:
parent
8ac16127cf
commit
ffabb76185
@ -1,5 +1,8 @@
|
||||
2013-01-03 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/55842
|
||||
* semantics.c (trait_expr_value): Call maybe_instantiate_noexcept.
|
||||
|
||||
PR c++/55856
|
||||
* semantics.c (build_data_member_initialization): Handle DECL_EXPR.
|
||||
|
||||
|
@ -5454,7 +5454,8 @@ trait_expr_value (cp_trait_kind kind, tree type1, tree type2)
|
||||
return (trait_expr_value (CPTK_HAS_TRIVIAL_CONSTRUCTOR, type1, type2)
|
||||
|| (CLASS_TYPE_P (type1)
|
||||
&& (t = locate_ctor (type1))
|
||||
&& TYPE_NOTHROW_P (TREE_TYPE (t))));
|
||||
&& (maybe_instantiate_noexcept (t),
|
||||
TYPE_NOTHROW_P (TREE_TYPE (t)))));
|
||||
|
||||
case CPTK_HAS_TRIVIAL_CONSTRUCTOR:
|
||||
type1 = strip_array_types (type1);
|
||||
|
7
gcc/testsuite/g++.dg/ext/has_nothrow_constructor-2.C
Normal file
7
gcc/testsuite/g++.dg/ext/has_nothrow_constructor-2.C
Normal file
@ -0,0 +1,7 @@
|
||||
// PR c++/55842
|
||||
// { dg-options -std=c++11 }
|
||||
|
||||
template <class=void> struct number {
|
||||
number() noexcept(noexcept(0)) { }
|
||||
};
|
||||
const int z=__has_nothrow_constructor(number<>);
|
Loading…
x
Reference in New Issue
Block a user