Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
Contains notes about future changes to `enable_if` guards, explaining
where this is going.
  • Loading branch information
DanRStevens committed Mar 7, 2019
1 parent 782ff6b commit 7890b31
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Stream/Writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<typename T>
inline
std::enable_if_t<!std::is_trivially_copyable<typename T::value_type>::value>
std::enable_if_t<
// The enable_if check needs to change to something like:
// is_iterable<T> && is_writeable<typename T::value_type>
// For now, we leave the old check to avoid ambiguity
!std::is_trivially_copyable<typename T::value_type>::value
>
Write(const T& container) {
// Loop over all elements and call custom serializer for type
for (const auto& element : container) {
Expand Down

0 comments on commit 7890b31

Please sign in to comment.