diff options
Diffstat (limited to 'odb/pgsql/transaction.cxx')
-rw-r--r-- | odb/pgsql/transaction.cxx | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/odb/pgsql/transaction.cxx b/odb/pgsql/transaction.cxx deleted file mode 100644 index 3b32d80..0000000 --- a/odb/pgsql/transaction.cxx +++ /dev/null @@ -1,26 +0,0 @@ -// file : odb/pgsql/transaction.cxx -// license : GNU GPL v2; see accompanying LICENSE file - -#include <cassert> - -#include <odb/pgsql/transaction.hxx> - -namespace odb -{ - namespace pgsql - { - transaction& transaction:: - current () - { - // While the impl type can be of the concrete type, the transaction - // object can be created as either odb:: or odb::pgsql:: type. To - // work around that we are going to hard-cast one to the other - // relying on the fact that they have the same representation and - // no virtual functions. The former is checked in the tests. - // - odb::transaction& b (odb::transaction::current ()); - assert (dynamic_cast<transaction_impl*> (&b.implementation ()) != 0); - return reinterpret_cast<transaction&> (b); - } - } -} |