aboutsummaryrefslogtreecommitdiff
path: root/include/sqlitepp
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2018-02-15 22:20:25 +0100
committerRobin Krahl <me@robin-krahl.de>2018-02-15 22:25:52 +0100
commit9c658f9a1107b1879b87aa53dbb1dab60668e2b5 (patch)
treed50e1e6191358f60e85978e78e6275f32b8253e9 /include/sqlitepp
parenta46be28d077b4f19f4e8537982487e33e20e4f0c (diff)
downloadsqlitepp-9c658f9a1107b1879b87aa53dbb1dab60668e2b5.tar.gz
sqlitepp-9c658f9a1107b1879b87aa53dbb1dab60668e2b5.tar.bz2
Move version information to constants
The previous approach of preprocessor definitions was not really sound as these are only present during the compilation of sqlitepp. Therefore the version information is now stored in constants within the sqlitepp namespace.
Diffstat (limited to 'include/sqlitepp')
-rw-r--r--include/sqlitepp/sqlitepp.h22
1 files changed, 7 insertions, 15 deletions
diff --git a/include/sqlitepp/sqlitepp.h b/include/sqlitepp/sqlitepp.h
index 82f4f99..d75aa91 100644
--- a/include/sqlitepp/sqlitepp.h
+++ b/include/sqlitepp/sqlitepp.h
@@ -105,28 +105,20 @@
/// are destroyed. You can force them to free their resources using the
/// `close` methods.
-#ifndef SQLITEPP_VERSION_MAJOR
+/// \brief Contains all classes of the sqlitepp library.
+namespace sqlitepp {
+
/// \brief The major version of sqlitepp (part x of version number x.y.z).
-#define SQLITEPP_VERSION_MAJOR 0
-#endif
+extern const unsigned int VERSION_MAJOR;
-#ifndef SQLITEPP_VERSION_MINOR
/// \brief The minor version of sqlitepp (part y of version number x.y.z).
-#define SQLITEPP_VERSION_MINOR 0
-#endif
+extern const unsigned int VERSION_MINOR;
-#ifndef SQLITEPP_VERSION_PATCH
/// \brief The patch version of sqlitepp (part z of version number x.y.z).
-#define SQLITEPP_VERSION_PATCH 0
-#endif
+extern const unsigned int VERSION_PATCH;
-#ifndef SQLITEPP_VERSION
/// \brief The sqlitepp version in the format MAJOR.MINOR.PATCH.
-#define SQLITEPP_VERSION "0.0.0"
-#ifndef
-
-/// \brief Contains all classes of the sqlitepp library.
-namespace sqlitepp {
+extern const std::string VERSION;
/// \brief A class that forbids copying and assignments for all subclasses.
///