#14088: wxWidgets 2.8.x and VS11 Beta
-----------------------+----------------------------------------------------
Reporter: count0 | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 2.8.13
Component: base | Version: 2.8.x
Keywords: STL, VS11 | Blockedby:
Patch: 0 | Blocking:
-----------------------+----------------------------------------------------
There are compilation errors while compiling 2.8.x branch (from trunk), in
include\wx\list.h, when wxUSE_STL is defined to 1. The error is
"std::greater is not defined".
It looks like the headers have been adjusted in VS11, VC's <list> is no
longer including <xfunctional>, which has std::greater.
So simply including <functional> in include\wx\list.h will fix the issue:
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/string.h"
#if wxUSE_STL
#include "wx/beforestd.h"
#include <algorithm>
#include <functional> // Add this!
#include <iterator>
#include <list>
#include "wx/afterstd.h"
#endif
--
Ticket URL: <http://trac.wxwidgets.org/ticket/14088>
#14088: wxWidgets 2.8.x and VS11 Beta
-----------------------+----------------------------------------------------
Reporter: count0 | Owner:
Type: defect | Status: confirmed
Priority: normal | Milestone: 2.8.13
Component: base | Version: 2.8.x
Keywords: STL, VS11 | Blockedby:
Patch: 0 | Blocking:
-----------------------+----------------------------------------------------
Changes (by vadz):
* status: new => confirmed
Comment:
Should be safe to apply.
I'm a bit surprised that this is not needed in the trunk, we never include
`<functional>` there neither explicitly, yet the compilation works
there...
--
Ticket URL: <http://trac.wxwidgets.org/ticket/14088#comment:1>