common: fix array behaviour when its size is zero.
This patch fixes 2 things: - Double braced initialization of scalar types is not allowed in C++ so previous version, where underlying type for zero sized array was pointer prevented proper zero-sized array initlizatation. (Only some compilers complained about this) - Standard states that begin() and end() should return some unique value, now it is done by returning address of the array itself. To achive that alignment of zero-sized array is equal to alignment of type its holding. This approach is also taken by libstdc++.
parent
2dee95ea
Please register or sign in to comment