[odb-users] Multiple placeholders
Boris Kolpackov
boris at codesynthesis.com
Thu Apr 14 08:53:36 EDT 2016
Hi Aarón,
Aarón Bueno Villares <abv150ci at gmail.com> writes:
> 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).
Yes, you are wrong ;-). The query() function is part of the database class
and is not auto-generated.
> 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.
There are already a thousand little knobs like these in ODB (look for
example at smart pointer support) and I would much prefer not to add
yet another one. We are planning to drop C++98 after the next release
anyway.
> While inventing, another idea could be adding numeric placeholders: (?0),
> (?1), etc, similar to those of boost::format.
Let's get multiple placeholders working first.
Boris
More information about the odb-users
mailing list