November 2014

Illinois Hosts International C++ Standards Conference -- Tom Moone

Following the recent ISO C++ meeting hosted by Riverbed and the University of Illinois at Urbana-Champaign, the University posted this summary of the event:

Illinois Hosts International C++ Standards Conference

By Tom Moone 

The article includes a link to Bjarne Stroustrup's talk to the faculty and students:

Illinois was selected as the location for this conference for two reasons. First, the location was capable of providing a week’s worth of meeting space for the 100 or so attendees in plenary and breakout sessions from 8 a.m. to 10 p.m. Second, the department, together with the local office of Riverbed Technology, offered to host the conference. “We are entirely dependent on being invited,” explained Sutter. “So we are very grateful to the department for accommodating us.”

On Monday evening of the conference, Stroustrup gave a talk as part of the CS Department’s Distinguished Lecture Series titled “C++ as a Modern Language.” In the talk he explained how to program in that language using type safety, resource safety, unmatched performance, and a terse notation. Enthusiasm for this lecture was literally overwhelming as the audience filled auditorium in the Siebel center to standing room only, and two overflow rooms were opened up to watch the talk with a live stream.

N4298: Agenda and Meeting Notice for WG21 Ballot Resolution Telecon Meeting -- Herb Sutter

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: N4298

Date: 2014-11-14

Agenda and Meeting Notice for WG21 Ballot Resolution Telecon Meeting

by Herb Sutter

Excerpt:

This telecon has the specific agenda of finalizing PDTS ballot resolution for the Library Fundamentals PDTS (19568) and the Parallelism PDTS (19570). Most comments were already considered and given draft resolutions at the Urbana-Champaign WG21 meeting on November 8, and this telecon meeting will review those resolutions and ensure we resolve all official PDTS comments from SC22.

Functional Programming in C++ -- John Carmack

In case you missed it:

Functional Programming in C++

by John Carmack

From the article:

... My pragmatic summary: A large fraction of the flaws in software development are due to programmers not fully understanding all the possible states their code may execute in. In a multithreaded environment, the lack of understanding and the resulting problems are greatly amplified, almost to the point of panic if you are paying attention. Programming in a functional style makes the state presented to your code explicit, which makes it much easier to reason about, and, in a completely pure system, makes thread race conditions impossible.

I do believe that there is real value in pursuing functional programming, but it would be irresponsible to exhort everyone to abandon their C++ compilers and start coding in Lisp, Haskell, or, to be blunt, any other fringe language...

N4307, N4308: National body PDTS ballot comments on Library Fundamentals TS and Parallelism TS

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.

N4307: National Body Comments, ISO/IEC PDTS 19568, Technical Specification: C++ Extensions for Library Fundamentals (Barry Hedquist)

N4308: National Body Comments, ISO/IEC PDTS 19570, Technical Specification: C++ Extensions for Parallelism (Barry Hedquist)

 

Quick Q: What type do lambdas get compiled into? -- StackOverflow

Quick A: A compiler-generated type that stores the captured variables in its data members, and exposes the function signature and body as its operator().

Recently on SO:

What type do lambdas get compiled into?

As I know all data types must be known at compile time, and lambda is not a type. Does lambda got translated into anonymous struct with operator() or std::function wrapped?

For example,

std::for_each(v.begin(), v.end(), [](int n&){n++;});

Tiny Metaprogramming Library -- Eric Niebler

eric-niebler-toronto.PNGWe like to link to articles at all levels. This one's near the top of the scale, for those looking for a real challenge:

Tiny Metaprogramming Library

by Eric Niebler

As the intro says [emphasis ours]:

(Difficult-to-grok metaprogramming below. Not for the faint of heart.)

From the rest of the introduction:

At the recent Urbana-Champaign meeting of the C++ Standardization Committee, Bill Seymour presented his paper N4115: Searching for Types in Parameter Packs which, as its name suggests, describes a library facility for, uh, searching for a type in a parameter pack, among other things. It suggests a template called packer to hold a parameter pack:

// A class template that just holds a parameter pack:
template <class... T> struct packer { };

Many of you are probably already familiar with such a facility, but under a different name:

// A class template that is just a list of types:
template <class... T> struct typelist { };

It became clear in the discussion about N4115 that C++ needs a standard typelist template and some utilities for manipulating them. But what utilities, exactly? ...

Visual Studio 2015 Preview announced, includes Clang/LLVM support for Android, iOS

This morning, Microsoft announced Visual Studio 2015 Preview. It contains continued C++11/14 conformance improvements in the traditional Visual C++ compiler, and also adds direct support for the Clang/LLVM compiler toolchain to build C++ code for Android now and iOS in the near future.

Cross-Platform Mobile Development with Visual C++

by Ankit Asthana

From the announcement:

Modern application customers are demanding applications be available for multiple device platforms (such as Windows, Android and iOS).... C++ is unique as it provides the ability to write efficient, fast and feature rich cross-platform mobile code once which can then be shared across these different device platforms.

Visual Studio 2015 Preview introduces support for developers to be able to build cross-platform mobile native (C/C++) binaries targeting Windows platforms (through the Visual C++ toolchain C1xx/C2) and the Android platform (through Clang/llvm)...

What makes Clang so special? -- CoderGears

Today on CoderGears:

What makes Clang so special?

by CoderGears Team

From the article:

It’s proven that Clang is a mature compiler for C and C++ as [are the] GCC and Microsoft compilers, but what makes it special is the fact that it’s not just a compiler. It’s also an infrastructure to build tools. Thanks to its library based architecture which makes the reuse and integration of functionality provided more flexible and easier to integrate into other projects...