Em 22/05/2014, às 14:26, "Sebastian Karlsson" mailto:sebastian@noumenongames.com> escreveu:
In my case I have map such as: flat_map< pair< TypeInfo, TypeInfo >, ... >,
TypeInfo being a wrapper around std::type_info. From this map I want to
find lower & upper bound of some TypeInfo in comparison to the first
TypeInfo of the pair. Since I can't know the maximum & minimum TypeInfo I
can't construct a key_type to search with. In this case it would be great
to be able to use find with a templated argument ( in my case I'd overload
the comparison for pair and smack in a TypeInfo for comparing against first
).
templated find / lower / upper would also have the benefit of being faster
if key_type is expensive to create. Overall I can't think of any major
downfalls, and the changes would seem to be rather easy to make.
C++14 has a new feature precisely for this:
http://www.open-std.org/JTC1/sc22/WG21/docs/papers/2013/n3657.htm
I'd file a ticket requesting that N3657 be applied to associative Boost containers.
Joaquín M López Muñoz
Telefónica
________________________________
Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx