Iterators++, Part 3 -- Eric Niebler

Eric Niebler concludes his series about proxy iterators with:

Iterators++, Part 3

by Eric Niebler

From the article:

This is the forth and final post in a series about proxy iterators, the limitations of the existing STL iterator concept hierarchy, and what could be done about it. The first three posts describe the problems of proxy iterators, the way to swap and move their elements, and how to rigorously define what an Iterator is.

This time around I’ll be focusing on the final problem: how to properly constrain the higher-order algorithms so that they work with proxy iterators.

N4388: A Proposal to Add a Const-Propagating Wrapper to the Standard Library -- J Coe, R Mill

New WG21 papers are available. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N4388

Date: 2015-02-25

A Proposal to Add a Const-Propagating Wrapper to the Standard Library

by Jonathan Coe, Robert Mill

Excerpt:

We propose the introduction of a propagate_const wrapper class that propagates const-ness to pointer-like member variables. ... The behaviour of const member functions on objects with pointer-like data members is seen to be surprising by many experienced C++ developers. A const member function can call non-const functions on pointer-like data members and will do so by default without use of const_cast...

A conditional copy constructor -- Andrzej KrzemieĊ„ski

Andrzej writes in his recent blog about an issue library writers have to take care of.

A conditional copy constructor

by Andrzej Krzemieński

From the article:

In this post we will try to define a ‘wrapper’ class template that does or does not have a copy constructor depending on whether the wrapped class has it. This will be a good opportunity to explore in depth a couple of advanced C++ features. Note that this is a rather advanced topic and, unless you are writing or maintaining a generic library, you will probably never need this knowledge.

CppCon 2014 Meta Techniques: Heterogeneous Polymorphism&Fast Prototyping at Facebook--Marcelo Juchem

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

Meta Techniques: Heterogeneous Polymorphism & Fast Prototyping at Facebook

by Marcelo Juchem

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

As data driven systems evolve there's an ever growing demand for bringing new functionality into existing systems in an efficient, maintainable and least intrusive manner. When implementing features with different semantics or interfaces, virtual inheritance requires a compromise between design simplicity and performance. This implies a need for new techniques to achieve heterogeneous polymorphism efficiently. With C++11 and 14, type lists, type maps and variants can now be trivially implemented by the initiated. Facebook moves fast so we quickly adopted the new standards to further explore the capabilities of the type system. This talk demonstrates some meta-programming techniques like reflection and compile-time built structures to achieve heterogeneous polymorphism and fast prototyping.

C++ User Group Meetings in March

The monthly overview on the upcoming C++ User Group Meetings:

C++ User Group Meetings in March

by Jens Weller

The list of this month meetings:

4.3 C++ UG Saint Louis - DD Part 3 - C++11/14 Standard Libraries
5.3 C++ UG Paris - C++ FRUG #6 - La métaprogrammation, non non ca sert en vrai
11.3 C++ UG Utah - Graphics and Audio with Cinder
11.3 C++ UG Hungary - More Effective STL
11.3 C++ UG San Francisco/ Bay area - Experience with C++11 in ArangoDB
12.3 C++ UG NRW/Aachen - C++ User Gruppe (März)
12.3 C++ UG Dresden - Coding Dojo
12.3 C++ UG New York - How to Write A Shared Library
16.3 C++ UG Denver - C++ Lightning Talks
16.3 C++ UG Austin - North Austin Monthly C/C++ Pub Social
17.3 C++ UG Chicago - Richard Stallman
17.3 C++ UG Edinburgh - C++ Edinburgh
17.3 C++ UG Montpellier - Rencontre C++ mars
17.3 C++ UG Berlin - monthly meeting
18.3 C++ UG Bristol - Save the date
18.3 C++ UG Düsseldorf - Treffen der C++ User Gruppe NRW
18.3 C++ UG Ann Arbor - Meet & Greet
18.3 C++ UG Hamburg - C++ in der numerischen Programmierung
19.3 C++ UG Ruhrgebiet - surprise, surprise
24.3 C++ UG Portland - PDXCPP March Meeting
25.3 C++ UG San Francisco/ Bay area - Workshop and Discussion Group
26.3 C++ UG Bremen - First meetup
26.3 C++ UG Rhein-Neckar - C++ Usergroup Meeting
26.3 C++ UG Munich - Monthly Meeting
26.3 C++ UG Madrid - Sistemas Distribuidos con ZMQ y Google Protocol Buffers
27.3 C++ UG Istanbul - Smart Pointers - from 03 to 17

Vector Hosted Lists--Thomas Young

Want perfomance and speed? Vectors are the solution:

Vector Hosted Lists

by Thomas Young

From the article:

Vectors are great when adding or removing elements at the end of a sequence, but not so hot when deleting elements at arbitrary positions.

If that's a requirement, you might find yourself reaching for a pointer-based list.

Not so fast!

Memory locality is important, contiguous buffers are a really good thing, and a standard vector will often out-perform pointer-based lists even where you perform non-contiguous, list-style modifications such as arbitrary element deletion.

And we can 'host' a list within a vector to get the advantages of a contiguous buffer at the same time as 0(1) complexity for these kinds of manipulations...

Comparison of C++ Format and C library's printf -- Victor Zverovich

The C printf family is still the gold standard of performance for formatted I/O, but woefully fragile and inextensible. C++'s iostreams offers important advantages in type safety, but struggles with performance and internationalization.

A number of projects, such as Boost.Format, try to the advantages of both. Here's further discussion about one such library we linked to recently:

Comparison of C++ Format and C library's printf

by Victor Zverovich

From the article:

I was recently asked on GitHub why would someone use fmt::printf, which is a part of the C++ Format library, over the standard C library printf. This is a fair question and so I decided to write this blog post comparing the two.

Disclaimer: I’m the author of C++ Format, so this is all very biased =).

Google releases gRPC -- Mugur Marculescu

A new open source HTTP/2 RPC Framework for C++ and other languages has been released.

Introducing gRPC, a new open source HTTP/2 RPC Framework

by Mugur Marculescu

From the article:

Today, we are open sourcing gRPC, a brand new framework for handling remote procedure calls. It’s BSD licensed, based on the recently finalized HTTP/2 standard, and enables easy creation of highly performant, scalable APIs and microservices in many popular programming languages and platforms. Internally at Google, we are starting to use gRPC to expose most of our public services through gRPC endpoints as part of our long term commitment to HTTP/2.

CppCon 2014 Overview of Parallel Programming in C++--Pablo Halpern

While we wait for CppCon 2015 in September, we’re featuring videos of some of the 100+ talks from CppCon 2014. Here is today’s feature:

Overview of Parallel Programming in C++

 

by Pablo Halpern

(watch on YouTube) (watch on Channel 9)

Summary of the talk:

Parallel programming was once considered to be the exclusive realm of weather forecasters and particle physicists working on multi-million dollar super computers while the rest us relied on chip manufacturers to crank out faster CPUs every year. That era has come to an end. Clock speedups have been largely replaced by having more CPUs on a chip. Your typical smart phone now has 2 to 4 cores and your typical laptop or tablet has 4 to 8 cores. Servers have dozens of cores and supercomputers have thousands of cores.

If you want to speed up a computation on modern hardware, you need to take advantage of the multiple cores available. This talk is provides an overview of the parallelism landscape. We'll explore the what, why, and how of parallel programming, discuss the distinction between parallelism and concurrency and how they overlap, and learn about the problems that one runs into. We'll conclude with an overview of existing parallelism technologies in C++ and the future directions being considered for parallel programming in standard C++.