Bugs item #1878686, was opened at 2008-01-24 07:14
Message generated for change (Comment added) made by dums
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=766244&aid=1878686&group_id=146814
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: General code
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 7
Private: No
Submitted By: Max Yanchenko (enerjazzer)
>Assigned to: Francois Dumont (dums)
Summary: add explicit qualification in function calls
Initial Comment:
Please consider the following code:
#include <boost/mpl/distance.hpp>
#include <boost/mpl/empty_base.hpp>
#include <list>
struct X : boost::mpl::empty_base {};
void dummy() {
std::list<X>().size();
}
This innocent code doesn't compile with STLPort - std::list::size() makes an unqualified call to distance(), so ADL finds both std::distance and boost::mpl::distance, resulting in anbiguity:
size_type size() const {
size_type __result = distance(begin(), end());
return __result;
}
Could you please change the call to qualified std::distance in this and similar places?
Thanks,
Maxim
----------------------------------------------------------------------
>Comment By: Francois Dumont (dums)
Date: 2008-02-20 22:14
Message:
Logged In: YES
user_id=1096600
Originator: NO
Many namespace qualification has been added to avoid the most obvious ADL
issues.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=766244&aid=1878686&group_id=146814
|