auto text = root()->addWidget(std::make_unique<Wt::WText>("Hello!"));
We’ve released Wt 4.0.1.
Download the source code (wt-4.0.1.tar.gz) here, you can read the full release notes here.
This release mostly patches up a few bugs. We’ve also added some small new features, and one more interesting one. We’ve thought about adding it in 4.0.0 but it didn’t quite make the cut. Now, after Peter Sommerlad mentioned it again after my CppCon talk, we had to add it!
Because it was a bit verbose to write:
auto text = root()->addWidget(std::make_unique<Wt::WText>("Hello!"));
We’ve added WContainerWidget::addNew(), WContainerWidget::insertNew(), and WTemplate::bindNew(), so you can shorten it like this:
auto text = root()->addNew<Wt::WText>("Hello!");
#include <cmath>on DboTest.c for compilation.