diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-12-13 21:57:53 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-01-23 21:20:44 +0300 |
commit | fc3fb39c90ab7fe5fccbe3f3bc0eb2645157bb96 (patch) | |
tree | 6c8c1bfb5fe89f7378b92ac066b4ca8ecfd25228 /libcommon/common/common.hxx | |
parent | 02367faedb16b6186e8852de47e5b749dc48c2df (diff) |
Switch to build2
Diffstat (limited to 'libcommon/common/common.hxx')
-rw-r--r-- | libcommon/common/common.hxx | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/libcommon/common/common.hxx b/libcommon/common/common.hxx deleted file mode 100644 index 21672b1..0000000 --- a/libcommon/common/common.hxx +++ /dev/null @@ -1,53 +0,0 @@ -// file : libcommon/common/common.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef LIBCOMMON_COMMON_COMMON_HXX -#define LIBCOMMON_COMMON_COMMON_HXX - -#include <memory> // std::auto_ptr -#include <cstddef> // std::size_t - -#include <odb/forward.hxx> // odb::database -#include <odb/result.hxx> - -#include <common/export.hxx> - -// Make sure assert() is not disabled. -// -#ifdef NDEBUG -# error ODB tests require enabled assert(); un-define the NDEBUG macro -#endif - -LIBCOMMON_EXPORT std::auto_ptr<odb::database> -create_database (int argc, - char* argv[], - bool create_schema = true, - std::size_t max_connections = 0, - odb::database_id db = odb::id_common); - -template <typename T> -std::auto_ptr<T> -create_specific_database (int argc, - char* argv[], - bool create_schema = true, - std::size_t max_connections = 0) -{ - std::auto_ptr<odb::database> r ( - create_database (argc, argv, - create_schema, - max_connections, - T::database_id)); - - return std::auto_ptr<T> (&dynamic_cast<T&> (*r.release ())); -} - -// This function returns an accurate result only if the result iterator -// hasn't been advanced and after the call the result is no longer valid. -// -template <typename T> -std::size_t -size (odb::result<T>); - -#include <common/common.txx> - -#endif // LIBCOMMON_COMMON_COMMON_HXX |