Opened 13 years ago
Closed 12 years ago
#444 closed defect (fixed)
Strange bug in ListPath<>
Reported by: | Alpar Juttner | Owned by: | Alpar Juttner |
---|---|---|---|
Priority: | blocker | Milestone: | LEMON 1.3 release |
Component: | core | Version: | hg main |
Keywords: | Cc: | ||
Revision id: | 38e1d4383262 |
Description (last modified by )
Valgrind report an error on the following code:
ListPath<ListDigraph> p,q; p.addBack(a); q=p;
The problem seems to be that q=p
tries to copy bitwise instead of using the template ListPath<>::operator=()
implementation.
Implementing a non-template version solves the problem, but I don't understand why the template version is used.
I fear that this issue may affect other Path structures, or even other tools, too.
Change History (2)
comment:1 Changed 13 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
The issue has been fixed in [7440937d154b] and merged to all relevant branches (1.1,1.2,default).
The reason for the problem is the usual utmost stupidity of C++ - the default copy constructor is of higher priority than an explicitly defined template one.