Details
Diff Detail
Event Timeline
libc/src/__support/CPP/blockstore.h | ||
---|---|---|
138 | REVERSE_ORDER only controls the iteration. IMO, back and pop_back are independent of that and should work irrespective of the REVERSE_ORDER. | |
144 | I think it might be better have a static assert like this: static_assert(__has_trivial_contructor(T) && __has_trivial_destructor(T)); | |
157 | Please fix. |
libc/src/__support/CPP/blockstore.h | ||
---|---|---|
138 | I just realized I pressed submit while I was still thinking about this. Go ahead and submit this patch with one change: Instead of a static_assert in the function body, use a EnableIf for the return type. I have few other thoughts. They would be best expressed as a separate patch, which I will do after you land this. |
libc/src/__support/CPP/blockstore.h | ||
---|---|---|
138 | Ah, didn't see this comment while working on it. How does this look? I can revert to revision 1 if you'd like. But I guess this is probably better | |
144 | I'll do this in a follow up patch and add an IsTrivially[Con|De]structible to TypeTraits.h to put the implementation dependent builtins in a more generic place. |
libc/src/__support/CPP/blockstore.h | ||
---|---|---|
138 | Still fine. I don't quite like the for loop on line 56, but fine for now. |
libc/src/__support/CPP/blockstore.h | ||
---|---|---|
138 | Agreed, this is why I initially had it only for REVERSE_ORDER. In any case there are no current users of BlockStore<T, N, false> |
REVERSE_ORDER only controls the iteration. IMO, back and pop_back are independent of that and should work irrespective of the REVERSE_ORDER.