Lambda Magic ✨ -- Adi Shavit
Are C++ lambdas magical?
Lambda Magic ✨
by Adi Shavit
From the article:
"Like fairies, captureless lambdas are pure and magical creatures.
Unlike fairies, captureless lambdas can be converted to function pointers."
October 25, Pavia, Italy
November 6-8, Berlin, Germany
November 3-8, Kona, HI, USA
By Adi | Nov 21, 2016 11:35 PM | Tags: None
Are C++ lambdas magical?
Lambda Magic ✨
by Adi Shavit
From the article:
"Like fairies, captureless lambdas are pure and magical creatures.
Unlike fairies, captureless lambdas can be converted to function pointers."
By Mantosh Kumar | Nov 21, 2016 10:34 PM | Tags: performance efficiency
Discussion on how we can efficiently use std::vector<T> container.
6 Tips to supercharge C++11 vector performance
by Deb Haldar
From the article:
Vector is like the swiss army knife of C++ STL containers. In the words of Bjarne Stroutsoup – “By default, use Vector when you need a container”. For mere mortals like us, we take this as gospel and just run with it. However, Vector is just a tool and like any tool, it can be used both effectively or ineffectively.
In this article we’ll look at 6 ways to optimize usage of vectors. We’ll look at both efficient and inefficient ways to perform the most common programming tasks using vectors, measure the performance gain we obtain by using vectors efficiently and try to understand why we’re getting the performance gain.
By Mantosh Kumar | Nov 21, 2016 09:44 PM | Tags: None
Discussion on "Distinguish between () and {} when creating objects".
![]()
Help me sort out the meaning of "{}" as a constructor argument
by Scott Meyers
From the article:
My experiments showed that one factor affecting whether "{{}}" as an argument list yields a zero-length std::initializer_list<T> was whether T had a default constructor, so I threw together some test code involving three classes, two of which could not be default-constructed. I then used both "({})" (note the outer parentheses) and "{{}}" as argument lists to a constructor taking a std::initializer_list for a template class imaginatively named X. When the constructor runs, it displays the number of elements in its std::initializer_list parameter.
By robwirving | Nov 18, 2016 08:49 AM | Tags: None
Episode 79 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Daniel Marjamäki to talk about developing the CppCheck static analysis tool.
CppCast Episode 79: Cppcheck with Daniel Marjamäki
by Rob Irving and Jason Turner
About the interviewee:
Daniel lives in Stockholm, Sweden with his wife and son. He has a degree in electronics but has never worked as an electronics engineer. Daniel works as a consultant at Evidente in Sweden which provides consultants and contractors for embedded software development and static analysis. Daniel started Cppcheck almost 10 years ago as a hobby project that he works on in his spare time. Daniel sometimes works on other hobby projects such as an open source retro mobile phone with a rotary dial plate instead of buttons or a screen.
By Blog Staff | Nov 15, 2016 11:05 AM | Tags: None
A trip report from the just-concluded ISO C++ meeting:
Trip report: Fall ISO C++ standards meeting (Issaquah)
by Herb Sutter
From the article:
Draft C++17 hit its major feature-freeze at our previous meeting, and over the summer we conducted its major ISO comment ballot. So the primary focus at this meeting was addressing the review comments. Think of it as the “shakedown” stage of fixing bugs before release.
We expected to take two meetings to resolve all the comments, and we are on track. So at our next meeting we hope to finish addressing the ballot comments and any other fixes we can resolve and hopefully set C++17 in stone as we send it out for its possibly-final formal approval ballot.
... Besides resolving C++17 ballot comments, we also worked on the TSes: We completed one, sent two out for their main ballots, and have two more expected to go out for their main ballots at the next meeting. ... A lot of our C++ standardization work is reaching “ship stage” at about the same time, which is pretty exciting to see, so we’re in the middle of a busy handful of meetings.
By Jason Turner | Nov 14, 2016 11:12 AM | Tags: c++14 basics
Episode 37 of C++ Weekly.
Stateful Lambdas
by Jason Turner
About the show:
In this episode Jason demonstrates how stateful lambdas can be created using features from C++14.
By fj | Nov 14, 2016 02:34 AM | Tags: None
C++11 re-introduces auto keyword that enables basic type inference. Using auto not only improves code readability.
When type inference fails
by Krzysztof Ostrowski
From the article:
Use of type inference puts impact on what is possible to be done with certain value, i.e. on its interface or concept it models, rather than on its concrete type. Unfortunately,
autodoes type inference locally, thus is not such powerful as we might expect. Here follows some examples ofauto-inference failures.
By Adrien Hamelin | Nov 11, 2016 12:58 PM | Tags: None
If you want to know more about C++:
TedX talk: The Driving Force Behind C++
by Bjarne Stroustrup
By Adrien Hamelin | Nov 11, 2016 12:54 PM | Tags: performance advanced
A very interesting article about the cost of our basic operations.
Infographics: Operation Costs in CPU Clock Cycles
by “No Bugs” Hare
From the article:
Whenever we need to optimise the code, we should profile it, plain and simple. However, sometimes it makes sense just to know ballpark numbers for relative costs of some popular operations, so you won’t do grossly inefficient things from the very beginning (and hopefully won’t need to profile the program later )...
By robwirving | Nov 11, 2016 09:32 AM | Tags: None
Episode 78 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Odin Holmes to talk about developing for Embedded Microcontrollers with C++ and the Kvasir library.
CppCast Episode 78: Kvasir with Odin Holmes
by Rob Irving and Jason Turner
About the interviewee:
Odin Holmes has been programming bare metal embedded systems for 15+ years and as any honest nerd admits most of that time was spent debugging his stupid mistakes. With the advent of the 100x speed up of template metaprogramming provided by C++11 his current mission began: teach the compiler to find his stupid mistakes at compile time so he has more free time for even more template metaprogramming. Odin Holmes is the author of the Kvasir.io library, a DSL which wraps bare metal special function register interactions allowing full static checking and a considerable efficiency gain over common practice. He is also active in building and refining the tools need for this task such as the brigand MPL library, a replacement candidate for boost.parameter and a better public API for boost.MSM-lite.