From: SourceForge.net <no...@so...> - 2009-11-14 23:09:30
|
Bugs item #1727662, was opened at 2007-05-29 14:53 Message generated for change (Comment added) made by wsfulton You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=1727662&group_id=1645 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: code generation (general) Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Luke Moore (lukemoore) >Assigned to: William Fulton (wsfulton) Summary: Warnings when using std library Initial Comment: When using std_vector.i or std_map.i with Python (and probably other languages that have no concept of const), swig generates warnings such as: /usr/share/swig1.3/std/std_vector.i:93: Warning(512): Overloaded begin() const ignored. Non-const method at /usr/share/swig1.3/std/std_vector.i:93 used. /usr/share/swig1.3/std/std_vector.i:93: Warning(512): Overloaded end() const ignored. Non-const method at /usr/share/swig1.3/std/std_vector.i:93 used. /usr/share/swig1.3/std/std_vector.i:93: Warning(512): Overloaded rbegin() const ignored. Non-const method at /usr/share/swig1.3/std/std_vector.i:93 used. /usr/share/swig1.3/std/std_vector.i:93: Warning(512): Overloaded rend() const ignored. Non-const method at /usr/share/swig1.3/std/std_vector.i:93 used. This is because Lib/std/std_container.i contains both iterator begin(); iterator end(); reverse_iterator rbegin(); reverse_iterator rend(); and const_iterator begin() const; const_iterator end() const; const_reverse_iterator rbegin() const; const_reverse_iterator rend() const; Removing the const versions of begin(), end(), rbegin(), and rend() from Lib/std/std_container.i removes the warnings. Using std_map.i generates similar warnings about the const versions of find(), lower_bound(), and upper_bound(). For a test case that illustrates the warnings, see #1727629. ---------------------------------------------------------------------- >Comment By: William Fulton (wsfulton) Date: 2009-11-14 23:09 Message: This was fixed in swig-1.3.35. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=1727662&group_id=1645 |