advanced

CppCon 2015 What's New in Visual C++ 2015 and Future Directions--Steve Carroll • Ayman Shoukry

Have you registered for CppCon 2016 in September? Don’t delay – Early Bird 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:

What's New in Visual C++ 2015 and Future Directions

by Steve Carroll • Ayman Shoukry

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

In this talk, we'll discuss new features, optimizations, and scenarios in Visual Studio 2015. We'll cover new backend optimizations, improved build throughput, new productivity and diagnostics features, and give a detailed update on our conformance progress, as well as talk about cool new c++1y features that we are shipping from await to modules.

Visual Studio isn't just for Microsoft platform developers. We'll also demonstrate our latest cross platform C++ development features for Android and iOS. We'll also give a sneak peak at our work on combining the Clang frontend with our existing backend to bring Clang support for Windows to Visual Studio.

C++Now 2016 trip report--Vittorio Romeo

Do you want to know what happened at the last C++Now?

C++Now 2016 trip report

by Vittorio Romeo

From the article:

I am very happy to have been part of the C++Now conference for another year, and I hope that I'll be able to come back in the future.

This year, I participated both as a speaker and as a Student/Volunteer.

The experience was, again, simply fantastic: I spent four days in a beautiful location, attended some of the most technically advanced and innovative C++ talks and, most importantly, had the occasion to meet a lot of amazing people.

As a Student/Volunteer, my tasks included: recording the talks, helping during the lunch break/picnic, assisting speakers during sessions and generally helping attendees when possible.

I'd like to thank Jon Kalb, Bryce Lelbach, and the rest of conference staff for making my participation possible.

In this trip report, I'll briefly describe some of my favorite talks and what I have learned from them, then introduce my sessions...

Diagnosable validity -- Andrzej Krzemieński

Andrzej Krzemieński wrote down his thoughts on ill-formed C++ code.


Diagnosable validity

by Andrzej Krzemieński

From the article:

Certain combinations of types and expressions can make a C++ program ill-formed. “Ill-formed” is a term taken from the C++ Standard and it means that a program is not valid, and compiler must (in most of the cases) reject it. This is quite obvious:

int main()
{
  auto i = "some text".size(); // invalid expression
};

String literals do not have member functions, therefore compiler cannot accept this program, and must report an error. This puts a responsibility on programmers to learn which expressions and types are valid in a given context and use only these. Again, I am saying a very obvious thing.

What is less obvious is that there is a way in C++ to enter a type or expression of which we do not know if it is valid or not, in an isolated environment, where it does not render the entire program ill-formed, but instead it returns a yes-no (or rather valid-invalid) answer, which we can use at compile-time to make a decision how we want the program to behave. When requested, compiler can analyze all the declarations it has seen so far, and make an approximated judgement whether a given type or expression would make the program ill-formed or not, if used outside the isolated environment. The compiler’s approximated answer is not always correct, but it is just enough most of the time.

 

CppCon 2015 Expression Templates - Past, Present, Future--Joel Falcou

Have you registered for CppCon 2016 in September? Don’t delay – Early Bird 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:

Expression Templates - Past, Present, Future+

by Joel Falcou

Part 1: (watch on YouTube) (watch on Channel 9)

Part 2: (watch on YouTube) (watch on Channel 9)

Part 3: (watch on YouTube) (watch on Channel 9)

Summary of the talk:

Expression Templates is one of this C++ idiom people learn to either love or hate. The main issues with ET is that everubody has its own conception about what they are, when they should be used, what benefits they give and what are their trade off. For a long time, Expression Tempaltes has been seen has a way to improve temporary heavy code. If the seminal implementation of ET by Todd Veldhuizen was actually about this, the landscape has changed since C++11 and C++14.

This workshop will go over : - what are exactly Expression Templates and what kind of use case they can solve elegantly and efficiently - what are the benefits that one may reap by using expression tempalte in its library - what are the real cost of expressont empaltes both at runtime and compile-time - which tools to use to not reinvent the tempalte wheel everytime including an introduction to Boost.PROTO an Boost.HANA.

The main objective is to clarify why, even in C++1*, this idiom has a meaningful set of applications and how to navigate around its pitfalls.

CppCon 2015 Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!--Chandler Carruth

Have you registered for CppCon 2016 in September? Don’t delay – Early Bird 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:

Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!

by Chandler Carruth

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

A primary use case for C++ is low latency, low overhead, high performance code. But C++ does not give you these things for free, it gives you the tools to control these things and achieve them where needed. How do you realize this potential of the language? How do you tune your C++ code and achieve the necessary performance metrics?

This talk will walk through the process of tuning C++ code from benchmarking to performance analysis. It will focus on small scale performance problems ranging from loop kernels to data structures and algorithms. It will show you how to write benchmarks that effectively measure different aspects of performance even in the face of advanced compiler optimizations and bedeviling modern CPUs. It will also show how to analyze the performance of your benchmark, understand its behavior as well as the CPUs behavior, and use a wide array of tools available to isolate and pinpoint performance problems. The tools and some processor details will be Linux and x86 specific, but the techniques and concepts should be broadly applicable.

The Ultimate Question of Programming, Refactoring, and Everything

Yes, you've guessed correctly - the answer is "42". In this article you will find 42 recommendations about coding in C++ that can help a programmer avoid a lot of errors, save time and effort.

The Ultimate Question of Programming, Refactoring, and Everything

by Andrey Karpov

From the article:

The scope of my interests − the C/C++ language and the promotion of code analysis methodology. I have been Microsoft MVP in Visual C++ for 5 years. The main aim of my articles and work in general - is to make the code of programs safer and more secure. I'll be really glad if these recommendations help you write better code, and avoid typical errors. Those who write code standards for companies may also find some helpful information here.

Sessions and object lifetimes--Andrzej Krzemieński

How will you move?

Sessions and object lifetimes

by Andrzej Krzemieński

From the article:

In this post we will see how C++ object lifetime can be used to control the duration of sessions: time spent owing and using a resource. The goal is to get a better understanding of what tools the language offers for using and sharing resources efficiently...

Concepts without Concepts--Andrzej Krzemieński

Concetps are good, but how can we get them?

Concepts without Concepts

by Andrzej Krzemieński

From the article:

“Concept” can mean two things in the context of C++ generic libraries:

  1. Something informal: something we know about template parameters, and can tell to other human programmers, e.g. in documentation.
  2. A language feature.

This post is about concepts in the first sense. It claims that we had concepts for quite a while already, and shows how we can use them to make generic libraries easier to use...