aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/connection.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-11-09 18:14:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-11-09 18:14:37 +0200
commitfc70be62d8698496a20b6947d102757f426c5b3e (patch)
tree92610ee68abf5a1fcc40e8717c4011628865c601 /odb/pgsql/connection.ixx
parentf5f515acc2b926eb838b82b457f6b5979db5f309 (diff)
Make database class move-constructible
This means it can be returned by value from a function in C++11.
Diffstat (limited to 'odb/pgsql/connection.ixx')
-rw-r--r--odb/pgsql/connection.ixx6
1 files changed, 6 insertions, 0 deletions
diff --git a/odb/pgsql/connection.ixx b/odb/pgsql/connection.ixx
index f549dd4..92ce453 100644
--- a/odb/pgsql/connection.ixx
+++ b/odb/pgsql/connection.ixx
@@ -6,6 +6,12 @@ namespace odb
{
namespace pgsql
{
+ inline database& connection::
+ database ()
+ {
+ return static_cast<connection_factory&> (factory_).database ();
+ }
+
template <typename T>
inline prepared_query<T> connection::
prepare_query (const char* n, const char* q)