This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] DR 438
On Apr 27, 2007, at 3:59 PM, Paolo Carlini wrote:
I noticed only today for the first time that the implementation is
allowed to do better than recognizing integers... (well, if ever
possible, I would suggest not spending too much time reasoning
about those issues in the context of C++03 DRs, concepts will
chaneg everything here, right?)
<nod> :-) Actually you can do a lot better than is_integral today.
The code that inspired the issue had is_input_iterator which keyed on
whether the type had a nested iterator_category which is convertible
to std::input_iterator_tag (not 100% foolproof, but I think it is
correct to 99.9999%). And then the dispatching was done with
enable_if on the user-level member templates, instead of dispatching
internally after binding to the user-level member templates (much
like concepts will do). So implicit conversions on both f and l are
"more correct" (with the concept model). We might have to get
explicit conversion operators to actually tell the difference
(already blessed by EWG).
-Howard