Error: Twitter did not respond. Please wait a few minutes and refresh this page.
Tag Archives: c++11
I’ve just come across a compiler error resulting from using boost::result_of with a C++11 lambda. I wasn’t actually using boost::result_of directly, but provided a lambda as the transforming functor for a boost::transform_iterator, which uses it behind the scenes. Here’s a … Continue reading
I’ve been intrigued by the idea of lock-free programming since I discovered that C++0x (as it was then) was to gain library facilities for standardised, portable lock-free programming. The new <atomic> header enables us to perform atomic reads and writes … Continue reading
Using the standard allocator for a different type [and get free functionality for your custom allocator]
Someone on comp.lang.c++.moderated recently asked “if I have a different allocator, can I use that allocator to allocate memory with vector or string…?”. Since there is not only the mechanism supported by C++98/03, but also a more general – and … Continue reading
I’ll wager that most C++ developers with experience of templates have at some point discovered the limitation that a class template’s parameters cannot be deduced in construction. Since type deduction can be performed in invocation of a function template however, I … Continue reading
Boris Kolpackov has written a series of 3 articles on the minefield of efficient argument passing in C++11. In part 1 he discusses the addition to C++11 – rvalue references – that improves argument-passing efficiency in some cases, but that … Continue reading