invalid default argument on member function

Bug #1272279 reported by Jonathan Wakely
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Brain Party
Undecided
Unassigned

Bug Description

The patch below fixes a C++ conformance issue, this is necessary to compile with the latest versions of G++ or Clang

=== modified file 'BPList.h'
--- BPList.h 2010-04-15 19:33:02 +0000
+++ BPList.h 2014-01-24 11:05:17 +0000
@@ -138,7 +138,7 @@
        ~BPPList();
        void Add(T item);
        bool Contains(T item);
- void Clear(bool safe_delete);
+ void Clear(bool safe_delete = true);
        int IndexOf(T item);
        void Insert(int pos, T item);
        void Remove(T item);
@@ -171,7 +171,7 @@
 }

 template <class T>
-void BPPList<T>::Clear(bool safe_delete = true) {
+void BPPList<T>::Clear(bool safe_delete) {
        if (safe_delete) {
                for (int i = data.size() - 1; i >= 0; --i) {
                        T item = data[i];

Revision history for this message
Rémi Verschelde (rverschelde) wrote :

I confirm that this patches fixes the compilation issue on Mageia Cauldron with upcoming gcc 4.9.1.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers