mclow.lists added inline comments.
================
Comment at: include/experimental/functional:159
@@ +158,3 @@
+ _LIBCPP_INLINE_VISIBILITY
+ void insert(const key_type &__key, value_type __val)
+ {
----------------
EricWF wrote:
> Do we want to copy the `__val` here?
See line #192.
================
Comment at: include/experimental/functional:192
@@ +191,3 @@
+ _LIBCPP_INLINE_VISIBILITY
+ void insert(key_type __key, value_type __val)
+ {
----------------
EricWF wrote:
> Do we want the extra copy of `__val` here?
`value_type` is a difference_type. (`size_t`, usually).
================
Comment at: include/experimental/functional:215
@@ +214,3 @@
+ _VSTD::is_integral<value_type>::value && // what about
enums?
+ sizeof(value_type) == 1 &&
+ is_same<_Hash, hash<value_type>>::value &&
----------------
EricWF wrote:
> Is this only meant to trigger for `char` and `bool`? I think it would be
> wrong to use the array specialization for `bool` because it can only
> represent 2 values but the array will end up having a size of `256`.
Also unsigned char, signed char, uint8_t, int8_t (and maybe enums).
http://reviews.llvm.org/D11380
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits