From 3a160a80c788d81e48acf19a2cf68f29cf125dae Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 25 Jan 2024 18:52:59 +0300 Subject: Turn libodb-mysql repository into package for muti-package repository --- libodb-mysql/odb/mysql/details/conversion.hxx | 58 +++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 libodb-mysql/odb/mysql/details/conversion.hxx (limited to 'libodb-mysql/odb/mysql/details/conversion.hxx') diff --git a/libodb-mysql/odb/mysql/details/conversion.hxx b/libodb-mysql/odb/mysql/details/conversion.hxx new file mode 100644 index 0000000..5d1f575 --- /dev/null +++ b/libodb-mysql/odb/mysql/details/conversion.hxx @@ -0,0 +1,58 @@ +// file : odb/mysql/details/conversion.hxx +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_MYSQL_DETAILS_CONVERSION_HXX +#define ODB_MYSQL_DETAILS_CONVERSION_HXX + +#include + +#include + +namespace odb +{ + // @@ Revise this. + // + namespace details {} + + namespace mysql + { + namespace details + { + using namespace odb::details; + + // Detect whether conversion is specified in type_traits. + // + template + meta::yes + conversion_p_test (typename type_traits::conversion*); + + template + meta::no + conversion_p_test (...); + + template + struct conversion_p + { + static const bool value = + sizeof (conversion_p_test (0)) == sizeof (meta::yes); + }; + + template ::value> + struct conversion; + + template + struct conversion + { + static const char* to () {return type_traits::conversion::to ();} + }; + + template + struct conversion + { + static const char* to () {return 0;} + }; + } + } +} + +#endif // ODB_MYSQL_DETAILS_CONVERSION_HXX -- cgit v1.1