From 1f217e38f7507758da1d33d46e675e801621aa38 Mon Sep 17 00:00:00 2001 From: Michael Shepanski Date: Thu, 30 Oct 2014 15:21:32 +1100 Subject: Allow lambdas & std::functions as query factories with C++-98 builds of libodb --- odb/connection.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'odb/connection.cxx') diff --git a/odb/connection.cxx b/odb/connection.cxx index 4319f9f..14e89e2 100644 --- a/odb/connection.cxx +++ b/odb/connection.cxx @@ -96,16 +96,11 @@ namespace odb if (i == prepared_map_.end ()) { - // See if there is a factory. + // Use a factory, if there is one. // - database_type::query_factory_type f ( - database_.lookup_query_factory (name)); - - if (f) - { - f (name, const_cast (*this)); + if (database_.call_query_factory (name, + const_cast (*this))) i = prepared_map_.find (name); - } } if (i == prepared_map_.end ()) -- cgit v1.1