Sorting by indices, part 2—Raymond Chen

It seems a simple problem, yet…

Sorting by indices, part 2

by Raymond Chen

From the article:

Before we dig into the Schwartzian transform, let's look at a more conventional generic way to sort by a key:

template<typename Iter, typename UnaryOperation, typename Compare>
void sort_by(Iter first, Iter last, UnaryOperation op, Compare comp)
{
  std::sort(first, last,
            [&](T& a, T& b) { return comp(op(a), op(b)); });
}

The idea here is that you give a unary operator op that produces a sort key, and we sort the items by that key according to the comparer...

passing functions to functions--Vittorio Romeo

How do you pass functions?

passing functions to functions

by Vittorio Romeo

From the article:

Since the advent of C++11 writing more functional code has become easier. Functional programming patterns and ideas are powerful additions to the C++ developer's huge toolbox. (I recently attended a great introductory talk on them by Phil Nash at the first London C++ Meetup - you can find an older recording here on YouTube.)

In this blog post I'll briefly cover some techniques that can be used to pass functions to other functions and show their impact on the generated assembly at the end...

N4633: 2017-11 Albuquerque WG21 meeting information -- Carter Edwards

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

Document number: N4633

Date: 2017-01-09

2017-11 Albuquerque WG21 meeting information

by Carter Edwards

Excerpt:

Sandia National Laboratories is pleased to host the Fall 2017 WG21 working meeting on November 6-11, 2107 at Albuquerque Marriott Hotel, 2101 Louisiana Blvd NE, Albuquerque, NM 87110...

CppCast Episode 84: Memory Algorithm Proposal with Brittany Friedman

Episode 84 of CppCast the only podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Brittany Friedman to talk about her accepted C++17 proposal which adds new algorithms and utilities for memory management and the process she went through getting the proposal accepted.

CppCast Episode 84: Memory Algorithm Proposal with Brittany Friedman

by Rob Irving and Jason Turner

About the interviewee:

Brittany Friedman is a dense collection of matter formed from molecules originating inside the sun. She currently works as a programmer at Gearbox Software, where she weaves ones and zeroes into intricate little patterns. Her proposal for new memory management algorithms was accepted for C++17 and a bug that she filed against the C++ standard was fixed the way that she recommended. So basically you do not want to trifle with her.

C++Now 2017 Call for Submissions is Live

C++Now 2017 will be held in Aspen, May 15–20, 2017.

C++Now 2017 Call for Submissions

From the invitation:

C++Now builds upon the resounding success of previous BoostCon and C++Now conferences, We look forward to considering your proposals, among those from leading speakers from the entire C++ community, to make C++Now 2017 even better.

The C++Now Conference is dedicated to discussion and education about C++, an open and free language and standard.  Our Conference will focus on discussion and education about open source software usage and developments in the C++ developer and user community. To reflect the breadth of the C++ and Boost communities, the conference includes sessions aimed at three constituencies: C++ and Boost end-users, hard-core library and tool developers, and researchers pushing the boundaries of computing. The program fosters interaction and engagement within and across those groups, with an emphasis on discussion.

As a multi-paradigm language, C++ is a melting pot with the most compelling ideas from other programming communities blended in powerful ways. Historically, some of the most popular sessions at C++Now have highlighted these concepts, from DSLs to functional programming to transactional memory and more.  Bring your C#, Python, Ruby or Haskell influences to bear in an environment that will broaden their exposure.

Presentations at C++Now 2017 should generally focus on the now established C++11 and C++14 standards, the upcoming C++17 standard, and how those standards shape C++’s future. However, by no means is this intended to restrict the topics of proposals we hope to see. Any other topic related to C++, as described below, is suitable for submission.

This year’s window for submitting is shorter than normal. Submissions must be in by February 3rd, less than four weeks away.

Lazy generators: template deduction on the left-hand side -- Simon Brand

How to do template deduction on the left-hand side of initialization using lazy generators.

Lazy generators: template deduction on the left-hand side

by Simon Brand

From the article:

If you are constructing or assigning to a variable from some function template call, the template magic usually occurs on the right-hand side of the expression. But what if we could deduce the type we want from the left-hand side of the construction?

The Salami Method -- Adi Shavit

C and C++ are probably the only viable languages for true cross-platform development.

The Salami Method

by Adi Shavit

From the article:

The Salami Method finely distinguishes between the different aspects and layers required for exposing platform-independent C++ on different “specific” platforms. At its extreme it strives to create a single, thin, transparent layer for each such aspect so that each layer is more easily built, tested, debugged, managed and maintained.