-
Join 8 other subscribers
Tags
Tweets
Tweets by robdesbois_progMy Photography
Archives
Meta
Tag Archives: c++11
Eric Niebler: out parameters, move semantics, and stateful algorithms
Eric Niebler: out parameters, move semantics, and stateful algorithms This post from Eric, inspired by a prompt from Andrei Alexcandrescu, examines the interface of std::getline appraising its usability and performance. Eric looks at a few different designs, in particular those … Continue reading
Posted in Uncategorized
Tagged boost, c++, c++11, design, iostreams, performance, range
Leave a comment
Boost compile error “no class template named ‘result’”
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
Adventures in lock-free programming
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
Posted in Uncategorized
Tagged c++, c++11, concurrency, lock-free, multi-threaded, parallelism
Leave a comment
Eric Niebler: stupid name lookup
Eric Niebler: stupid name lookup Eric Niebler shows a name lookup failure caused by a recursive template function inferring its return type via decltype. Stupid problem with a rather nasty hacky workaround, but also a likely change in C++14 that … 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
Generalised type-deduction for class template instance construction
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
Posted in Uncategorized
Tagged c++, c++11, generic programming, templates, variadic templates
Leave a comment
Efficient argument passing in c++11 [via A Sense of Design]
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
Virtual move constructor
Virtual constructor: recap Most experienced C++ developers should be familiar with the virtual constructor idiom, which allows us to duplicate a polymorphic object where we do not know its exact type, only the base. It is usually called clone and can … Continue reading
Herb Sutter to revisit Guru of the Week for C++11
I’ve just read on Herb’s site that he will be revisiting his superbGuru of the Week column, revising and adding articles to cover the changes brought by the new C++ standard, C++11. For those of you who haven’t seen it … Continue reading