Idea for more delegations in <algorithm>
Paolo Carlini
pcarlini@suse.de
Wed Mar 23 16:23:00 GMT 2005
Hi everyone, hi Chris,
today I got an idea, or better I *read* an idea: do you know N1758?
Basically, Siek et al., explain at pag. 37 how to to do dispatching
without tag types. Nothing very exoteric, actually, if you know
enable_if, but this strikes me as potentially solving at the root the
optimization problems with empty classes! Because we do *not* have
additional parameters in the function calls!
For instance, they implement "do the right thing" for vector as:
template<typename InputIterator>
vector<InputIterator first, InputIterator last,
typename
enable_if<(!is_integral<InputIterator>::value), void*>::type = 0);
Or, for some reason, we have troubles with this too? :(
Paolo.
More information about the Libstdc++
mailing list