diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-01-14 13:26:53 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-01-14 13:50:19 +0000 |
commit | 43c2145f1bfab0f2d5d5b3b3999bc7c99c2d62dd (patch) | |
tree | 3f01160dff20b50d37edd12a6306261eb1a9cbb2 /staging_vespalib | |
parent | 3d0321eca4f93717e4afda679ca735b0b3535ce2 (diff) |
Handle bool in grouping in the backend too.
Diffstat (limited to 'staging_vespalib')
-rw-r--r-- | staging_vespalib/src/vespa/vespalib/util/sort.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/staging_vespalib/src/vespa/vespalib/util/sort.h b/staging_vespalib/src/vespa/vespalib/util/sort.h index d5c73df9b96..c4bf0d6326b 100644 --- a/staging_vespalib/src/vespa/vespalib/util/sort.h +++ b/staging_vespalib/src/vespa/vespalib/util/sort.h @@ -169,6 +169,27 @@ public: }; template<> +class convertForSort<bool, true> +{ +public: + typedef bool InputType; + typedef bool IntType; + typedef bool UIntType; + typedef std::less<InputType> Compare; + static inline UIntType convert(IntType value) { return value; } +}; +template<> +class convertForSort<bool, false> +{ +public: + typedef bool InputType; + typedef bool IntType; + typedef bool UIntType; + typedef std::less<InputType> Compare; + static inline UIntType convert(IntType value) { return !value; } +}; + +template<> class convertForSort<int8_t, true> { public: |