diff --git a/include/sqlpp11/group_by.h b/include/sqlpp11/group_by.h index 34210ec8..8d5a4696 100644 --- a/include/sqlpp11/group_by.h +++ b/include/sqlpp11/group_by.h @@ -235,7 +235,7 @@ namespace sqlpp private: template - auto _group_by_impl(Check, Expressions... expressions) const -> Check; + auto _group_by_impl(inconsistent, Expressions... expressions) const -> Check; template auto _group_by_impl(consistent_t, Expressions... expressions) const diff --git a/include/sqlpp11/inconsistent.h b/include/sqlpp11/inconsistent.h new file mode 100644 index 00000000..326be226 --- /dev/null +++ b/include/sqlpp11/inconsistent.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2016-2016, Roland Bock + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SQLPP_INCONSISTENT_H +#define SQLPP_INCONSISTENT_H + +namespace sqlpp +{ + template + struct inconsistent + { + inconsistent(Check) + { + } + }; + + // This specialization circumvents an ambiguity problem with gcc + // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77449 + template <> + struct inconsistent + { + }; +} + +#endif diff --git a/include/sqlpp11/insert_value_list.h b/include/sqlpp11/insert_value_list.h index 5e16bfe5..8eb718f6 100644 --- a/include/sqlpp11/insert_value_list.h +++ b/include/sqlpp11/insert_value_list.h @@ -526,7 +526,7 @@ namespace sqlpp private: template - auto _columns_impl(Check, Columns... cols) const -> Check; + auto _columns_impl(inconsistent, Columns... cols) const -> Check; template auto _columns_impl(consistent_t, Columns... cols) const @@ -546,7 +546,7 @@ namespace sqlpp } template - auto _set_impl(Check, Assignments... assignments) const -> Check; + auto _set_impl(inconsistent, Assignments... assignments) const -> Check; template auto _set_impl(consistent_t, Assignments... assignments) const diff --git a/include/sqlpp11/order_by.h b/include/sqlpp11/order_by.h index 509d0950..d13eb7a9 100644 --- a/include/sqlpp11/order_by.h +++ b/include/sqlpp11/order_by.h @@ -233,7 +233,7 @@ namespace sqlpp private: template - auto _order_by_impl(Check, Expressions... expressions) const -> Check; + auto _order_by_impl(inconsistent, Expressions... expressions) const -> Check; template auto _order_by_impl(consistent_t, Expressions... expressions) const diff --git a/include/sqlpp11/portable_static_assert.h b/include/sqlpp11/portable_static_assert.h index dc3b94a2..b0a8036c 100644 --- a/include/sqlpp11/portable_static_assert.h +++ b/include/sqlpp11/portable_static_assert.h @@ -28,6 +28,7 @@ #define SQLPP_PORTABLE_STATIC_ASSERT_H #include +#include namespace sqlpp { diff --git a/include/sqlpp11/select_flag_list.h b/include/sqlpp11/select_flag_list.h index 4c87168c..7f593055 100644 --- a/include/sqlpp11/select_flag_list.h +++ b/include/sqlpp11/select_flag_list.h @@ -223,7 +223,7 @@ namespace sqlpp private: template - auto _flags_impl(Check, Flags... flgs) const -> Check; + auto _flags_impl(inconsistent, Flags... flgs) const -> Check; template auto _flags_impl(consistent_t, Flags... flgs) const diff --git a/include/sqlpp11/update_list.h b/include/sqlpp11/update_list.h index 63e19af9..c79c17d0 100644 --- a/include/sqlpp11/update_list.h +++ b/include/sqlpp11/update_list.h @@ -273,7 +273,7 @@ namespace sqlpp private: template - auto _set_impl(Check, Assignments... assignments) const -> Check; + auto _set_impl(inconsistent, Assignments... assignments) const -> Check; template auto _set_impl(consistent_t, Assignments... assignments) const diff --git a/include/sqlpp11/using.h b/include/sqlpp11/using.h index e09c5f4b..84fede64 100644 --- a/include/sqlpp11/using.h +++ b/include/sqlpp11/using.h @@ -224,7 +224,7 @@ namespace sqlpp private: template - auto _using_impl(Check, Tables... tables) const -> Check; + auto _using_impl(inconsistent, Tables... tables) const -> Check; template auto _using_impl(consistent_t, Tables... tables) const