orig_arg = TREE_OPERAND (orig_arg, 0);
if (!uses_template_parms (t)
- && !(force_conv ? uses_template_parms (orig_arg)
- : type_dependent_expression_p (orig_arg)))
+ && !type_dependent_expression_p (orig_arg)
+ && !(force_conv
+ && !(same_type_ignoring_top_level_qualifiers_p
+ (TREE_TYPE (orig_arg), t))
+ && value_dependent_expression_p (orig_arg)))
/* We used to call digest_init here. However, digest_init
will report errors, which we don't want when complain
is zero. More importantly, digest_init will try too
--- /dev/null
+// PR c++/122127
+// { dg-do compile { target c++11 } }
+
+template <int> struct resize;
+template <int _Np> using resize_t = resize<_Np>;
+template <class _Ap> struct basic_mask {
+ void _M_chunk() {
+ constexpr int __rem = 1;
+ [&] { resize_t<__rem>(); }();
+ }
+};