Wt 4 is Wt’s big update to C++11 and a more modern C++ style along with it.
Notable changes are:
Owning raw pointers have been replaced by smart pointers. Notably,
WContainerWidget::addWidget(WWidget*) have been replaced by
WContainerWidget::addWidget(std::unique_ptr<WWidget>). Also, some objects that had a single owner before, like
WValidator, are now shared.
Wt 4 relies less on Boost, preferring the standard library where possible. Boost has almost been completely removed from the header files of Wt, which should significantly shorten compilation time.
Boost.Signals2 has been replaced by a new implementation that should offer better performance and easier debugging due to shorter, more understandable stack traces. Also, you don’t need to
std::bind away extra arguments when using lambda functions now.
Boost.Date_Time has been replaced by Howard Hinnant’s
Boost.Any has been replaced by
Wt::cpp17::any. The implementation can be switched at compile time between
std::experimental::any, or (by default) an included implementation that implements the small object optimization.
The use of Wt header files without .h has been deprecated, because this often confused IDEs and yielded no real benefit.
There’s a new default implementation for
Everything that was marked as deprecated in Wt 3 has been removed.
Note that Wt 4 is not at release candidate status yet! While functionally quite mature, some things may still change depending on the feedback we receive. Also, the documentation may still be outdated in some places.
We are excited to hear your thoughts about Wt 4!