+2014-02-20 Jason Merrill <jason@redhat.com>
+
+ PR c++/60274
+ Revert:
+ PR c++/58606
+ * pt.c (template_parm_to_arg): Call convert_from_reference.
+ (tsubst_template_arg): Don't strip reference refs.
+
2014-02-20 Kai Tietz <ktietz@redhat.com>
PR c++/58873
SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT
(vec, TREE_VEC_LENGTH (vec));
#endif
- t = convert_from_reference (t);
TREE_VEC_ELT (vec, 0) = make_pack_expansion (t);
t = make_node (NONTYPE_ARGUMENT_PACK);
/*integral_constant_expression_p=*/true);
if (!(complain & tf_warning))
--c_inhibit_evaluation_warnings;
+ /* Preserve the raw-reference nature of T. */
+ if (TREE_TYPE (t) && TREE_CODE (TREE_TYPE (t)) == REFERENCE_TYPE
+ && REFERENCE_REF_P (r))
+ r = TREE_OPERAND (r, 0);
}
return r;
}
+++ /dev/null
-// PR c++/58606
-// { dg-require-effective-target c++11 }
-
-template<int&...I> struct A
-{
- template<typename> struct B;
-
- template<typename T> struct B<T*> {};
-};
--- /dev/null
+// PR c++/60274
+
+typedef const char *const& ProtocolIdType;
+
+template <ProtocolIdType protocolId>
+struct C {
+ typedef int ProtocolVersion;
+ struct D {
+ ProtocolVersion GetProtocolVersion();
+ };
+};
+template <ProtocolIdType protocolId>
+typename C<protocolId>::ProtocolVersion C<protocolId>::D::GetProtocolVersion()
+{
+ return 1;
+}