From 7890b3127875b9205e24760a6531b925138acace Mon Sep 17 00:00:00 2001 From: Daniel Stevens Date: Thu, 7 Mar 2019 20:21:37 +0700 Subject: [PATCH] Update documentation Contains notes about future changes to `enable_if` guards, explaining where this is going. --- src/Stream/Writer.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Stream/Writer.h b/src/Stream/Writer.h index 28125379..b08c3493 100644 --- a/src/Stream/Writer.h +++ b/src/Stream/Writer.h @@ -42,10 +42,15 @@ namespace Stream WriteImplementation(vector.data(), vector.size() * sizeof(T)); } - // Vector of non trivially copyable data types + // Arbitrary container of writeable data types template inline - std::enable_if_t::value> + std::enable_if_t< + // The enable_if check needs to change to something like: + // is_iterable && is_writeable + // For now, we leave the old check to avoid ambiguity + !std::is_trivially_copyable::value + > Write(const T& container) { // Loop over all elements and call custom serializer for type for (const auto& element : container) {