[PATCH] D20719: Remove use of is_trivially_constructible.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Thu May 26 22:00:17 PDT 2016
On Thu, May 26, 2016 at 7:53 PM, Rui Ueyama via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> ruiu added inline comments.
> Comment at: include/llvm/DebugInfo/CodeView/StreamArray.h:114-115
> @@ -113,4 +113,2 @@
> friend class FixedStreamArrayIterator<T>;
> - static_assert(std::is_trivially_constructible<T>::value,
> - "FixedStreamArray must be used with trivial types");
> majnemer wrote:
> > You could go with `std::is_standard_layout<T>::value &&
> std::is_trivial<T>::value` to get more or less the same thing.
> This seems a bit too tricky to me. It would just fail if you pass
> non-trivially-constructible class to this one, so I'm okay without this
what/how would it fail? Testing for is_trivially_constructible to me would
indicate that this code is using memory that's perhaps zero'd out without
invoking the ctor for the type. If the type isn't trivially constructible
that sort of thing's going to result in subtle behavior, quite often not an
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits