aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-10-19 09:42:13 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-10-19 09:42:13 +0200
commit466d6c6b149127bd5c648d030e37d71ba48ab1b3 (patch)
treef9a136c5a4f2f59462913aeecebafab05c6af380
parent8338bb049db44d9b470b2a76acc5853b92915238 (diff)
Use unique_ptr in C++11 code fragment
-rw-r--r--prepared/driver.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/prepared/driver.cxx b/prepared/driver.cxx
index 470d0b8..7d561a9 100644
--- a/prepared/driver.cxx
+++ b/prepared/driver.cxx
@@ -192,11 +192,11 @@ main (int argc, char* argv[])
"person-age-name-query",
[] (const char* name, connection& c)
{
- auto_ptr<params> p (new params);
+ unique_ptr<params> p (new params);
query q (query::age > query::_ref (p->age) &&
query::first == query::_ref (p->first));
prepared_query<person> pq (c.prepare_query<person> (name, q));
- c.cache_query (pq, p);
+ c.cache_query (pq, std::move (p));
});
*/