0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 20:31:16 +08:00

Replaced char[] with char[<sizeof>] to please MSVC 2015

This commit is contained in:
rbock 2015-05-29 20:06:21 +02:00
parent 7b750bbe97
commit 30a3a6b2ff
3 changed files with 12 additions and 12 deletions

View File

@ -35,7 +35,7 @@
{\ {\
struct _alias_t\ struct _alias_t\
{\ {\
static constexpr const char _literal[] = #name;\ static constexpr const char _literal[sizeof(#name)] = #name;\
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;\ using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;\
template<typename T>\ template<typename T>\
struct _member_t\ struct _member_t\

View File

@ -146,7 +146,7 @@ for tableCreation in tableCreations:
print(' {', file=header) print(' {', file=header)
print(' struct _alias_t', file=header) print(' struct _alias_t', file=header)
print(' {', file=header) print(' {', file=header)
print(' static constexpr const char _literal[] = "' + sqlColumnName + '";', file=header) print(' static constexpr const char _literal[' + str(len(sqlColumnName) + 1) + '] = "' + sqlColumnName + '";', file=header)
print(' using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;', file=header) print(' using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;', file=header)
print(' template<typename T>', file=header) print(' template<typename T>', file=header)
print(' struct _member_t', file=header) print(' struct _member_t', file=header)
@ -178,7 +178,7 @@ for tableCreation in tableCreations:
print(' {', file=header) print(' {', file=header)
print(' struct _alias_t', file=header) print(' struct _alias_t', file=header)
print(' {', file=header) print(' {', file=header)
print(' static constexpr const char _literal[] = "' + sqlTableName + '";', file=header) print(' static constexpr const char _literal[' + str(len(sqlTableName) + 1) + '] = "' + sqlTableName + '";', file=header)
print(' using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;', file=header) print(' using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;', file=header)
print(' template<typename T>', file=header) print(' template<typename T>', file=header)
print(' struct _member_t', file=header) print(' struct _member_t', file=header)

View File

@ -13,7 +13,7 @@ namespace test
{ {
struct _alias_t struct _alias_t
{ {
static constexpr const char _literal[] = "delta"; static constexpr const char _literal[6] = "delta";
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>; using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
template<typename T> template<typename T>
struct _member_t struct _member_t
@ -29,7 +29,7 @@ namespace test
{ {
struct _alias_t struct _alias_t
{ {
static constexpr const char _literal[] = "epsilon"; static constexpr const char _literal[8] = "epsilon";
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>; using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
template<typename T> template<typename T>
struct _member_t struct _member_t
@ -45,7 +45,7 @@ namespace test
{ {
struct _alias_t struct _alias_t
{ {
static constexpr const char _literal[] = "omega"; static constexpr const char _literal[6] = "omega";
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>; using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
template<typename T> template<typename T>
struct _member_t struct _member_t
@ -66,7 +66,7 @@ namespace test
{ {
struct _alias_t struct _alias_t
{ {
static constexpr const char _literal[] = "tab_foo"; static constexpr const char _literal[8] = "tab_foo";
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>; using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
template<typename T> template<typename T>
struct _member_t struct _member_t
@ -83,7 +83,7 @@ namespace test
{ {
struct _alias_t struct _alias_t
{ {
static constexpr const char _literal[] = "alpha"; static constexpr const char _literal[6] = "alpha";
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>; using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
template<typename T> template<typename T>
struct _member_t struct _member_t
@ -99,7 +99,7 @@ namespace test
{ {
struct _alias_t struct _alias_t
{ {
static constexpr const char _literal[] = "beta"; static constexpr const char _literal[5] = "beta";
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>; using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
template<typename T> template<typename T>
struct _member_t struct _member_t
@ -115,7 +115,7 @@ namespace test
{ {
struct _alias_t struct _alias_t
{ {
static constexpr const char _literal[] = "gamma"; static constexpr const char _literal[6] = "gamma";
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>; using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
template<typename T> template<typename T>
struct _member_t struct _member_t
@ -131,7 +131,7 @@ namespace test
{ {
struct _alias_t struct _alias_t
{ {
static constexpr const char _literal[] = "delta"; static constexpr const char _literal[6] = "delta";
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>; using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
template<typename T> template<typename T>
struct _member_t struct _member_t
@ -153,7 +153,7 @@ namespace test
{ {
struct _alias_t struct _alias_t
{ {
static constexpr const char _literal[] = "tab_bar"; static constexpr const char _literal[8] = "tab_bar";
using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>; using _name_t = sqlpp::make_char_sequence<sizeof(_literal), _literal>;
template<typename T> template<typename T>
struct _member_t struct _member_t