From 3590d27acaa8dfe920d8f4e9e487f3a78e07fea1 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Tue, 24 Oct 2017 23:20:46 +1300 Subject: [PATCH] Workaround MSVC limitation in SmallVector_ --- xapian-core/api/smallvector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xapian-core/api/smallvector.h b/xapian-core/api/smallvector.h index ccdc4faac..51bc22d84 100644 --- a/xapian-core/api/smallvector.h +++ b/xapian-core/api/smallvector.h @@ -295,9 +295,9 @@ using VecCOW = Vec; class SmallVector_ { std::size_t c; - void * p[2]; + static constexpr std::size_t INTERNAL_CAPACITY = 2; - static const std::size_t INTERNAL_CAPACITY = sizeof(p) / sizeof(*p); + void * p[INTERNAL_CAPACITY]; public: SmallVector_() : c(0) { } -- 2.11.4.GIT