From 70e245f19ec8e753784db6a1153c64e5f5eec16a Mon Sep 17 00:00:00 2001 From: Bruno Manganelli Date: Mon, 24 Dec 2018 20:52:58 +0000 Subject: cmAlgorithms: add utility functions to get signed size of containers --- Source/cmAlgorithms.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index bbd3e8e..2f8e675 100644 --- a/Source/cmAlgorithms.h +++ b/Source/cmAlgorithms.h @@ -396,6 +396,12 @@ constexpr #endif +template +int isize(const T& t) +{ + return static_cast(cm::size(t)); +} + #if __cplusplus >= 201402L || defined(_MSVC_LANG) && _MSVC_LANG >= 201402L using std::cbegin; -- cgit v0.12