* pt.c (instantiate_decl): Recognize when a function defaulted
outside the class is already instantiated.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180162
138bc75d-0d04-0410-961f-
82ee72b054a4
2011-10-18 Jason Merrill <jason@redhat.com>
+ PR c++/50531
+ * pt.c (instantiate_decl): Recognize when a function defaulted
+ outside the class is already instantiated.
+
PR c++/50742
* decl.c (check_previous_goto_1): Handle using-decl.
d = DECL_CLONED_FUNCTION (d);
if (DECL_TEMPLATE_INSTANTIATED (d)
+ || (TREE_CODE (d) == FUNCTION_DECL
+ && DECL_DEFAULTED_FN (d) && DECL_INITIAL (d))
|| DECL_TEMPLATE_SPECIALIZATION (d))
/* D has already been instantiated or explicitly specialized, so
there's nothing for us to do here.
2011-10-18 Jason Merrill <jason@redhat.com>
+ PR c++/50531
+ * g++.dg/cpp0x/defaulted32.C: New.
+
PR c++/50742
* g++.dg/lookup/using23.C: New.
--- /dev/null
+// PR c++/50531
+// { dg-options -std=c++0x }
+
+template <typename T>
+class DataFilter
+{
+ public:
+ inline virtual ~DataFilter();
+};
+
+template<typename T>
+inline DataFilter<T>::~DataFilter() = default;
+
+class ARCalculator : public DataFilter<ARCalculator>
+{
+ public:
+ virtual void dataStart(int, int);
+};
+
+void ARCalculator::dataStart(int, int)
+{}