This page tracks the workarounds for the various compiler issues that we encountered in the development. This is mostly of interest for developers interested in contributing to xwidgets.
Visual Studio 2017 and
xwidgets.cpp a number of widget types are precompiled, in order to
improve the just-in-time compilation time in the context of the cling C++
However, with Visual Studio 2017, the introduction of
instructions for certain widget types causes compilation errors. This is the
case for widget types that are used as properties for other widgets such as
xlayout and style widgets.
The upstream MSVC issue issue appears to have been solved with VS2017 15.7
(Preview 3). The impacted build numbers for Visual Studio are
Visual Studio and CRTP bases¶
If we have
template <class T> class Foo : public Bar<Foo<T>>, then within
the implementation of
Bar should be a template, and not refer to
Bar<Foo<T>>. However, unlike GCC and Clang, Visual Studio incorrectly makes
Bar refer to the fully specialized template type.
Visual Studio and ambiguous calls to base constructors in mixins¶
xobject.hpp, we explicitely define constructors instead of making use of the
using statement for the base constructor because MSVC wrongly reports that the
call to the base class constructor is ambiguous in derived classes.