Commit 41c89663 authored by Igor Chorazewicz's avatar Igor Chorazewicz
Browse files

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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment