From 296956caccb5bd738ceadcd35cc1bb7340c7dcc3 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Mon, 3 Aug 2020 17:56:24 +1000 Subject: [PATCH] More agressive concept for stl containers --- src/common/concepts.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/concepts.h b/src/common/concepts.h index d71c6443c3..b804077148 100644 --- a/src/common/concepts.h +++ b/src/common/concepts.h @@ -4,15 +4,17 @@ #pragma once -#include - // Check if type is like an STL container template concept IsSTLContainer = requires(T t) { typename T::value_type; + typename T::iterator; + typename T::const_iterator; // TODO(ogniK): Replace below is std::same_as when MSVC supports it. t.begin(); t.end(); + t.cbegin(); + t.cend(); t.data(); t.size(); };