http://bugs.winehq.org/show_bug.cgi?id=25942
Summary: Wine's implementation of d3dtypes.h does not work with ISO C++. Product: Wine Version: 1.3.11 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: dscharrer@gmail.com
The implementation of d3dtypes.h shipped with wine defines operator() in D3MATRIX as follows: /* This is different from MS, but avoids anonymous structs. */ D3DVALUE &operator () (int r, int c) { return ((D3DVALUE [4][4])&_11)[r][c]; } const D3DVALUE &operator() (int r, int c) const { return ((const D3DVALUE [4][4])&_11)[r][c]; }
Compiling a C++ winelib program which includes d3d.h using wineg++, without -fpermissive and with D3D_OVERLOADS defined, results in a compile error, as "/nemyax/apps/wine/1.3.12/include/wine/windows/d3dtypes.h:339: error: ISO C++ forbids casting to an array type ‘D3DVALUE [4][4]’".