diff options
Diffstat (limited to 'staging_vespalib/src')
-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: |