From d207a266380c5feba29c98ab9e79fd5167d651fd Mon Sep 17 00:00:00 2001 From: Aaron Bishop Date: Mon, 23 Oct 2017 09:10:10 -0400 Subject: [PATCH] Removed templated variables Also fixed tabs to spaces. Used github editor, can update later if there was a syntax error. --- include/sqlpp11/result.h | 44 +++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/include/sqlpp11/result.h b/include/sqlpp11/result.h index b38cf86b..024dfc85 100644 --- a/include/sqlpp11/result.h +++ b/include/sqlpp11/result.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015, Roland Bock + * Copyright (c) 2013-2017, Roland Bock, Aaron Bishop * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, @@ -40,27 +40,21 @@ namespace sqlpp namespace detail { - template - struct result_has_size : std::false_type {}; + template + struct result_has_size : std::false_type {}; - template - struct result_has_size().size())>> - : std::true_type {}; + template + struct result_has_size().size())>> + : std::true_type {}; - template - constexpr bool result_has_size_v = result_has_size::value; + template + struct result_size_type { using type = void; }; - template - struct result_size_type { using type = void; }; - - template - struct result_size_type().size())>> - { - using type = decltype(std::declval().size()); - }; - - template - using result_size_type_t = typename result_size_type::type; + template + struct result_size_type().size())>> + { + using type = decltype(std::declval().size()); + }; } template @@ -165,12 +159,12 @@ namespace sqlpp _result.next(_result_row); } - template> - Size size() const - { - static_assert(detail::result_has_size_v, "Underlying connector does not support size()"); - return _result.size(); - } + template::type> + Size size() const + { + static_assert(detail::result_has_size::value, "Underlying connector does not support size()"); + return _result.size(); + } }; } // namespace sqlpp