[odb-users] Multiple placeholders

Aarón Bueno Villares abv150ci at gmail.com
Tue Apr 12 12:55:39 EDT 2016


>
> Not yet, but there are plans to support this (will have to drop C++98
> support
> first; see below). [...] (C++11 variadic template).


Not necessarily, isn't?. The ODB compiler could generate so many template
parameters as ocurrences of (?) or something like that (I don't know the
relationship between your "core code" and your "generated code", but I
guess the placeholder management could be done on the generated code
without using variadic templates, though it could be worst from a design
point of view). Anyway, it doesn't need to break retrocompatibility; if a
user cannot compile C++11 code, they can't use queries with
multiple-placeholders, and that's all.

While inventing, another idea could be adding numeric placeholders: (?0),
(?1), etc, similar to those of boost::format.


More information about the odb-users mailing list