{abp_pagination_html}

boost

Using QtCreator together with the Visual Studio Build Tools

A first posting about working with Qt and Visual C++ in QtCreator

Using QtCreator together with the Visual Studio Build Tools

by Jens Weller

From the article:

For a while I've been using QtCreator as my IDE, mostly because its deep integration with Qt, as most of my projects are Qt related. With this, I also preferred (and still do a little) to use the MinGW builds of Qt on Windows. In the past, as GCC was a little bit better with the newer standards, today, well, never change a running system...

Ranges: the STL to the Next Level—Jonathan Boccara

Ranges are coming!

Ranges: the STL to the Next Level

by Jonathan Boccara

From the article:

The C++ Standard Template Library (STL) is a fantastic tool for making code more correct and expressive. It is mainly composed of two parts:

  • The containers, such as std::vector or std::map for instance,
  • The algorithms, a fairly large collection of generic functions that operate amongst others on containers. They are mostly found under the algorithm header.

(Not) detecting bugs—Andrzej KrzemieĊ„ski

Undefined behaviour can be dangerous.

(Not) detecting bugs

by Andrzej Krzemieński

From the article:

The following code contains a bug. A developer has spent quite some time looking for the source. The intent of this code is to iterate over two vectors simultaneously, from the first up to the one-before-last element. Thus the most interesting tools that will be employed will be boost::zip_iterator and std::prev.

#include <boost/iterator/zip_iterator.hpp>
#include <boost/tuple/tuple.hpp>
#include <vector>

using zip_iter = boost::zip_iterator<
                   boost::tuple<
                     std::vector<int>::iterator,
                     std::vector<int>::iterator
                   >
                 >;
int main()
{
  std::vector<int> v1 = {1, 2, 3, 4, 0};
  std::vector<int> v2 = {2, 3, 5, 7, 0};
    
  zip_iter beg {boost::make_tuple(v1.begin(), v2.begin())};
  zip_iter end {boost::make_tuple(v1.end(), v2.end())};
  
  auto process = [](zip_iter::reference){};
  std::for_each(beg, std::prev(end), process);
}

C++Now 2017 Call for Submissions is Live

C++Now 2017 will be held in Aspen, May 15–20, 2017.

C++Now 2017 Call for Submissions

From the invitation:

C++Now builds upon the resounding success of previous BoostCon and C++Now conferences, We look forward to considering your proposals, among those from leading speakers from the entire C++ community, to make C++Now 2017 even better.

The C++Now Conference is dedicated to discussion and education about C++, an open and free language and standard.  Our Conference will focus on discussion and education about open source software usage and developments in the C++ developer and user community. To reflect the breadth of the C++ and Boost communities, the conference includes sessions aimed at three constituencies: C++ and Boost end-users, hard-core library and tool developers, and researchers pushing the boundaries of computing. The program fosters interaction and engagement within and across those groups, with an emphasis on discussion.

As a multi-paradigm language, C++ is a melting pot with the most compelling ideas from other programming communities blended in powerful ways. Historically, some of the most popular sessions at C++Now have highlighted these concepts, from DSLs to functional programming to transactional memory and more.  Bring your C#, Python, Ruby or Haskell influences to bear in an environment that will broaden their exposure.

Presentations at C++Now 2017 should generally focus on the now established C++11 and C++14 standards, the upcoming C++17 standard, and how those standards shape C++’s future. However, by no means is this intended to restrict the topics of proposals we hope to see. Any other topic related to C++, as described below, is suitable for submission.

This year’s window for submitting is shorter than normal. Submissions must be in by February 3rd, less than four weeks away.

More Meeting C++ 2016 videos are online!

A week full of video editing brings the first batch of Meeting C++ 2016 videos online:

More videos are online!

by Jens Weller

Meeting C++ 2016 Playlist

From the article:

With today, almost all videos from the A and all videos of the D Track are online. There is a recording issue with one talk in the A track, which might get resolved in 2017. Also since today, the Meeting C++ YouTube channel has more then 400k views!

The full video set you can find in the Meeting C++ 2016 Playlist, the newest videos are easily found by visiting the Meeting C++ YouTube channel or subscribing to this RSS feed.

Why you should use Boost.MultiIndex (Part I)—David Gross

Did you know that container?

Why you should use Boost.MultiIndex (Part I)

by David Gross

From the article:

Although Boost.MultiIndex is a pretty old library — introduced in Boost 1.32, released in 2004 — I found it rather unsung and underestimated across the C++ community in comparison to other non-standard containers.

In this article, split into multiple parts, I will highlight all the benefits you can get using boost::multi_index_container instead of the standard containers: faster, cleaner and simpler code.

The Case for Optional References—Tristan Brindle

And why not simply use a pointer?

The Case for Optional References

by Tristan Brindle

From the article:

I have a confession to make. Whenever I’ve come across code that looks like this:

struct example {
    example() = default;

    example(std::string& s) : str_{s} {}

private:
    boost::optional<std::string&> str_{};
};

there is a little voice inside my head that whispers “why didn’t you just use a pointer?”. Like so, for instance:

struct example {
    example() = default;

    example(std::string& s) : str_{&s} {}

private:
    std::string* str_ = nullptr;
};

This is equivalent to the first example, except that it’s slightly less typing, it doesn’t have any dependencies, and feels in some sense “cleaner”. I personally have always preferred it.

Except, I was wrong. After attending Bjarne Stroustrup’s keynote and this excellent talk at Cppcon this morning, I’m persuaded that optional references are a good thing. In this post I hope to be able to convince you of the same...