diff options
Diffstat (limited to 'odb/oracle/database.hxx')
-rw-r--r-- | odb/oracle/database.hxx | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/odb/oracle/database.hxx b/odb/oracle/database.hxx index dcb5c92..d51d073 100644 --- a/odb/oracle/database.hxx +++ b/odb/oracle/database.hxx @@ -8,10 +8,12 @@ #include <odb/pre.hxx> #include <string> -#include <memory> // std::auto_ptr +#include <memory> // std::auto_ptr, std::unique_ptr #include <iosfwd> // std::ostream #include <odb/database.hxx> +#include <odb/details/config.hxx> // ODB_CXX11 +#include <odb/details/transfer-ptr.hxx> #include <odb/oracle/version.hxx> #include <odb/oracle/forward.hxx> @@ -38,8 +40,8 @@ namespace odb ub2 charset = 0, ub2 ncharset = 0, OCIEnv* environment = 0, - std::auto_ptr<connection_factory> factory = - std::auto_ptr<connection_factory> (0)); + details::transfer_ptr<connection_factory> = + details::transfer_ptr<connection_factory> ()); database (const std::string& user, const std::string& password, @@ -49,8 +51,8 @@ namespace odb ub2 charset = 0, ub2 ncharset = 0, OCIEnv* environment = 0, - std::auto_ptr<connection_factory> factory = - std::auto_ptr<connection_factory> (0)); + details::transfer_ptr<connection_factory> = + details::transfer_ptr<connection_factory> ()); // Extract the database parameters from the command line. The // following options are recognized: @@ -74,8 +76,8 @@ namespace odb ub2 charset = 0, ub2 ncharset = 0, OCIEnv* environment = 0, - std::auto_ptr<connection_factory> = - std::auto_ptr<connection_factory> (0)); + details::transfer_ptr<connection_factory> = + details::transfer_ptr<connection_factory> ()); static void print_usage (std::ostream&); @@ -186,7 +188,11 @@ namespace odb auto_handle<OCIEnv> auto_environment_; OCIEnv* environment_; +#ifdef ODB_CXX11 + std::unique_ptr<connection_factory> factory_; +#else std::auto_ptr<connection_factory> factory_; +#endif }; } } |