From: SourceForge.net <no...@so...> - 2003-08-06 11:40:09
|
Patches item #784120, was opened at 2003-08-06 11:40 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=307869&aid=784120&group_id=7869 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jonathan Wakely (redi) Assigned to: Nobody/Anonymous (nobody) Summary: Iterator typedef problems Initial Comment: The definition of class subscript_iterator (in mysqlcppapi/const_subscript_container.h) has a couple of problems. I think the template parameters given to subscript_iterator's base class are wrong. The third param is the iterator's difference_type, which must be a signed type. The parameter given is "typename OnType::size_type", which is an unsigned type. This doesn't actually cause any problems, because difference_type is re-declared correctly later in the subscript_iterator body. The second problem is simply that subscript_iterator inherits from std::iterator. This struct isn't available in the C++ library supplied with GCC 2.95, which prevents that compiler being used. The workaround is to remove the inheritance relationship and declare the iterator_category, value_type, point, reference and difference_type explicily (all std::iterator does is declare these typedefs anyway). This is standard-conforming and loses nothing, but adds backward-compatibility. This patch removes the inheritance and explicitly declares the required typedefs, so that gcc 2.95 can be used to compile the library. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=307869&aid=784120&group_id=7869 |