[ovs-dev] [PATCH] types: Define OVS_*128_MAX statically.

Ben Pfaff blp at ovn.org
Tue Dec 22 00:01:50 UTC 2015


On Mon, Dec 21, 2015 at 03:56:40PM -0800, Joe Stringer wrote:
> The previous definitions of these variables using designated
> initializers caused a variety of issues when attempting to compile with
> MSVC, particularly if including these headers from C++ code. By defining
> them like this, we can appease MSVC and keep the definitions the same on
> all platforms.
> 
> VMware-BZ: #1517163
> Suggested-by: Yin Lin <linyi at vmware.com>
> Signed-off-by: Joe Stringer <joe at ovn.org>

Why not just use a new-enough MSVC?  According to this discussion of the
topic, MSVC 2013 and newer support designated initializers in C++:
        http://stackoverflow.com/questions/18731707/why-does-c11-not-support-designated-initializer-list-as-c99



More information about the dev mailing list