Writing a reflection engine from scratch - Manuel Sanchez - Meeting C++ 2016
Next Video from Meeting C++ 2016
Writing a reflection engine from scratch
by Manuel Sanchez
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++ | Jan 25, 2017 09:47 AM | Tags: reflection c++14 basics advanced
Next Video from Meeting C++ 2016
Writing a reflection engine from scratch
by Manuel Sanchez
By Blog Staff | Jan 23, 2017 04:08 PM | Tags: None
This new paper by Bjarne Stroustrup has been brewing over the holidays, and is now ready for release as a prepublication draft:
Concepts: The Future of Generic Programming
or, How to design good concepts and use them wellby Bjarne Stroustrup
From the draft paper:
Conclusions
Concepts complete C++ templates as originally envisioned. I don’t see them as an extension but as a completion.
Concepts are quite simple to use and define. They are surprisingly helpful in improving the quality of generic code, but their principles – and not just their language-technical details – need to be understood for effective use. In that, concepts are similar to other fundamental constructs, such as functions. Compared to unconstrained templates, there are no run-time overheads incurred by using concepts.
Concepts are carefully designed to fit into C++ and to follow C++’s design principles:
- Provide good interfaces
- Look for semantic coherence
- Don’t force the user to do what a machine does better
- Keep simple things simple
- Zero-overhead
Don’t confuse familiarity and simplicity. Don’t confuse verbosity with “easy to understand.” Try concepts! They will dramatically improve your generic programming and make the current workarounds (e.g., traits classes) and low-level techniques (e.g., enable_if – based overloading) feel like error-prone and tedious assembly programming.
By Adrien Hamelin | Jan 23, 2017 02:21 PM | Tags: performance intermediate
does not prevent (N)RVO, youhou.
const
Const, Move and RVO
by Bartlomiej Filipek
From the article:
C++ is a surprising language. Sometimes simple things are not that simple in practice. Last time I argued that in function bodies const should be used most of the time. But two cases were missed: when moving and when returning a value.
Does const influence move and RVO?
By Adrien Hamelin | Jan 23, 2017 02:13 PM | Tags: intermediate c++11
C++ is evolving.
Functional in C++11 and C++14: Dispatch Table and Generic Lambdas
by Rainer Grimm
From the article:
My favourite example the dispatch table shows how nice the features in modern C++ work together. A dispatch table is a table of pointers to functions. In my case, it is a table of handles to polymorphic function wrappers...
By Adrien Hamelin | Jan 18, 2017 03:01 PM | Tags: c++11 basics
Do you know the trailing return type?
Pros and Cons of Alternative Function Syntax in C++
by Petr Zemek
From the article:
C++11 introduced an alternative syntax for writing function declarations. Instead of putting the return type before the name of the function (e.g. int func()), the new syntax allows us to write it after the parameters (e.g.
auto func() -> int). This leads to a couple of questions: Why was such an alternative syntax added? Is it meant to be a replacement for the original syntax? To help you with these questions, the present blog post tries to summarize the advantages and disadvantages of this newly added syntax...
By Adrien Hamelin | Jan 16, 2017 12:55 PM | Tags: intermediate boost
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.
By fj | Jan 13, 2017 04:33 AM | Tags: c++14
Classic interfaces that use bitmask to select many properties at once can be hard to use and very easy to break.
Alternative to select-many bitmask
by Krzysztof Ostrowski
From the article:
Suppose we have an interface that returns some value depending on combination of other values, and we would like get resource of some type
Rthat is common for Alice and Bob. Here is our interface:R query(std::uint32_t bitmask);First question arises quickly: what to put into
bitmask? There are plenty of values of typeuint32_t!Multiple possible ways to fix our interface and make it much easier to use exist. We will consider three of them.
By TartanLlama | Jan 13, 2017 04:32 AM | Tags: c++17
Showing how to use C++17 template argument deduction for constructors to get rid of those pesky make functions.
Template argument deduction for class template constructors
by Simon Brand
From the article:
Have you ever found yourself writing std::make_pair or std::make_move_iterator and wondering why we need a helper function to create these objects for us? The answer is a lack of template argument deduction for class template constructors.
[...]
Fortunately, this feature is coming in C++17!
By rodburns | Jan 13, 2017 04:28 AM | Tags: None
What does it take to build a C++ memory manager for safety critical applications such as autonomous vehicles?
Codeplay's Safety-Critical Memory Manager
by Illya Rudkin
From the article
In my experience, when implementing an application, the memory management part of its design is very often overlooked. That is also the case when considering the design for a Safety-Critical (SC) system. This blog post talks about why a memory manager should be considered in the design, especially for an SC system, and why the designers of such systems should consider implementing it first, before doing anything else.
Codeplay has created a Safety-Critical Memory Manager (SCMM) as part of its strategy to build an SC tool set, including implementations of open standards (such as OpenCL) for building artificial intelligence in automotive systems. We believe that an SCMM is a fundamental foundation stone to help us achieve and verify the safety goals for our systems in different problem domains.
By Adrien Hamelin | Jan 11, 2017 12:59 PM | Tags: intermediate experimental
Sorting can be done many ways.
A “sorted view”
by Nick Athanasiou
From the article:
This installment elaborates on the creation of a “sorted_view” utility. The “References” section contains links to the complete code; throughout the article, we provide demos and snippets to showcase and explain the implementations. The section on modernizing the code contains real world applications of the following C++17 features:
- structured bindings
- template argument deduction for class templates