Taming the Performance Beast - Klaus Iglberger - Meeting C++ 2015
The last video from Meeting C++ 2015 is online:
Taming the Performance Beast
by Klaus Iglberger
March 11-13, Online
March 16-18, Madrid, Spain
March 23-28, Croydon, London, UK
March 30, Kortrijk, Belgium
May 4-8, Aspen, CO, USA
May 4-8, Toronto, Canada
June 8 to 13, Brno, Czechia
June 17-20, Folkestone, UK
September 12-18, Aurora, CO, USA
November 6-8, Berlin, Germany
November 16-21, Búzios, Rio De Janeiro, Brazil
By Meeting C++ | Aug 3, 2016 01:15 AM | Tags: performance intermediate efficiency c++11 basics advanced
The last video from Meeting C++ 2015 is online:
Taming the Performance Beast
by Klaus Iglberger
By Jason Turner | Aug 1, 2016 02:05 PM | Tags: c++17 basics
Episode 22 of C++ Weekly.
C++17's Nested Namespaces and `std::clamp`
by Jason Turner
About the show:
This week Jason describes C++17's nested namespace support and the new library function `std::clamp`.
By Adrien Hamelin | Aug 1, 2016 12:58 PM | Tags: efficiency community
Have you registered for CppCon 2016 in September? Don’t delay – Registration is open now.
While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2015 for you to enjoy. Here is today’s feature:
Writing Great Libraries: 89 Easy Steps
by Zach Laine
Summary of the talk:
Writing code that does what you want it to do, correctly and efficiently, is hard. Doing so when you don't even know yet what you want the code to do yet is quite a bit harder. Yet this is the job of a library writer -- the users of a library may have a very different use case from that of the original author.
How do library writers develop correct and efficient APIs that are also:
- easy to use correctly - hard to use incorrectly - highly reusable - gracefully interoperable with other code
This talk gives lots of practical advice and techniques for accomplishing those goals and more.
By Meeting C++ | Jul 31, 2016 06:16 AM | Tags: user groups community
The monthly overview on upcoming C++ User Group meetings on Meeting C++:
C++ User Group Meetings in August
by Jens Weller
From the article:
The monthly overview on the upcoming C++ User Group meetings. As there is again a group meeting at the first, I have to publish this today, so that there will still be some groups not in the listing, as they are publishing their meetings in the coming days. Still, already 26 groups will meet in August!
There are 3 new C++ User Groups: Copenhagen, Singapore, and Gdansk.
By Adrien Hamelin | Jul 29, 2016 01:21 PM | Tags: advanced
How to synchronize between threqds or
Memory consistency made simple(ish)
by Glennan Carnie
From the article:
The C++11 memory consistency model is probably one of the most significant aspects of Modern C++; and yet probably one of the least well-understood. I think the reason is simple: it’s really difficult to understand what the problem actually is.
The memory consistency problem is a concurrency problem. That is, it’s a problem that occurs when we start writing multi-threaded code. More specifically, it’s a parallelism problem – the real subtleties occur when you have two or more processors executing code...
By Adrien Hamelin | Jul 29, 2016 01:19 PM | Tags: intermediate community
Have you registered for CppCon 2016 in September? Don’t delay – Registration is open now.
While we wait for this year’s event, we’re featuring videos of some of the 100+ talks from CppCon 2015 for you to enjoy. Here is today’s feature:
Test Driven C++ with Catch
by Phil Nash
Summary of the talk:
C++ has been notorious for being a second class citizen when it comes to test frameworks. There are plenty of them but they tend to be fiddly to set-up and ceremonious to use. Many of them attempt to follow the xUnit template without respect for the language environment they are written for. Catch is an attempt to cut through all of that. It is simple to get and simple to use - being distributed in a single header file - yet is powerful and flexible. Catch includes a number of innovations that make testing in C++ more natural - and fun - than ever before. This presentation introduces you to the unique approach that Catch brings to unit and integration testing - and how to use Catch to drive your design with TDD or BDD.
By robwirving | Jul 29, 2016 08:05 AM | Tags: None
Episode 65 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Matt Bentley to discuss plf::colony<> and plf::stack<> and some of their advantages over std::vector<> and std::stack<>.
CppCast Episode 65: PLF Library with Matt Bentley
by Rob Irving and Jason Turner
About the interviewee:
Matt Bentley was born in 1978 and never recovered from the experience. He started programming in 1986, completing a BSc Computer Science 1999, before spending three years working for a legal publishing firm, getting chronic fatigue syndrone, quitting, building a music studio, recovering, getting interested in programming again, building a game engine, and stumbling across some generalized solutions to some old problems.
By Adrien Hamelin | Jul 28, 2016 02:33 PM | Tags: intermediate
Do you use const well?
Const Correctness
by Arne Mertz
From the article:
Writing const correct code is about more than using
constin a few places and letting the compiler figure out if it makes sense.There are two components about using the keyword
constin C++ code: A syntactic component and a semantic component...
By Adrien Hamelin | Jul 28, 2016 02:19 PM | Tags: None
Quick A: Use std::unique_lock instead.
Recently on SO:
Conditional use of std::lock_guard
How about this one?
void bar(std::mutex * optionalMutex = nullptr) { auto lockScope = (optionalMutex == nullptr) ? std::unique_lock<std::mutex>() : std::unique_lock<std::mutex>(*optionalMutex); }Explanation: You're compiler had trouble with your prior statement because, you can not suddenly change the type of the ternary
?expression, i.e. the literal 0 is not astd::lock_guardand vice versa. So I changed the two branches to the same type, herestd::unique_lock<std::mutex>because lock_guard isn't designed be used without a valid mutex. But still preferstd::lock_guardoverstd::unique_lockin the simpler cases, because it will make you code more readable.Also your statement wasn't viable for the compiler, i.e. even syntactical correct, because the variable
lockScopewould only have existed in one branch.
By Adrien Hamelin | Jul 27, 2016 01:16 PM | Tags: intermediate c++11
What state is an object after move?
Move safety - know what can be done in the moved-from state
by Jonathan Müller
From the article:
C++ programmers have this notion of exception safety. It is a very useful concept. With it one can easily describe the post-conditions of a function if it throws.There is another situation where you need to easily describe some post-conditions: when talking about the state of an object after a move operation, i.e. after a move constructor or move assignment operator. I thus want to introduce vocabulary for those post-conditions of the right-hand argument similar to the exception safety of a function: The move safety, if you will.
The exception safety describes the post-conditions of a function if the function throws an exception. Similarly, the move safety describes the post-conditions of the object after a move operation. It thus gives information about what can be done safely with a moved-from object...