Variadic Templates -- Feabhas

variadic-templates.PNGRecently on StickyBits, a nice primer on variadics:

Variadic Templates

by feabhas

From the article:

In this article we’re going to look at a new feature of templates in C++11 -- the concept of the variadic template.

Variadic templates allow us to create functions and classes, not only with generic types, but also a variable number of generic types.

If you haven’t been following along with the template articles, I’d suggest you read this article first before continuing.

A Grand Introduction: Stepanov introduces Stroustrup at CppCon -- Tony DaSilva

Bulldozer00's appreciation for Alex Stepanov's introduction for Bjarne Stroustrup at CppCon. We already linked to the video last week -- but if you didn't watch it then, do yourself a favor and spend 6 minutes now getting your workweek off to a great start.

A Grand Introduction

by Tony DaSilva

From the article:

"We should not be ashamed of bits. We should be proud of them." -- Alex Stepanov

You may not interpret it in the same way as I did, but I found this cppcon conference introduction of Bjarne Stroustrup by programming scholar Alex Stepanov very moving...

N4149: Categorically qualified classes -- David Krauss

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

Date: 2014-09-25

Categorically qualified classes

by David Krauss

Excerpt:

Some classes only work in certain contexts: scope guards are usually useless as subexpressions, and expression template placeholders malfunction as local variables. An unused function result may signal that the caller intends to follow a different protocol, such as with std::async. This proposal extends class definitions to prevent such errors, and adds a mechanism to automatically resolve them by type substitution, such as a value type for an expression template. Additionally, generation of non-movable objects becomes more tractable.

The added functionality includes that of the “auto evaluation” proposals [1]. This proposal intends to be more expressive, more broadly applicable, and easier to adopt and use.

N4148: Disallowing Inaccessible Operators From Trivially Copyable -- Matheus Izvekov

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

Date: 2014-09-24

Disallowing Inaccessible Operators From Trivially Copyable

by Matheus Izvekov

Excerpt:

This proposal aims to solve a serious flaw in the definition of the trivially copyable concept. Presently, classes with deleted or inaccessible copy/move constructors, copy/move assignment operators and destructor are allowed to be trivially copyable, which might seem counterintuitive.

N4147: Inline variables, or encapsulated expressions -- David Krauss

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

Date: 2014-09-25

Inline variables, or encapsulated expressions

by David Krauss

Excerpt:

Inline functions have favorable behavior for interfaces which cannot be exposed as objects. Often, users are encouraged to use them to wrap global variables, despite unnatural boilerplate. Other workarounds include class static data members, enumerators, macros, and variable templates, all with awkward syntax or downsides and limited applicability. This proposal defines the inline specifier on variable definitions to indicate semantics similar to inline function evaluation and linkage. More generally, this produces a facility for named values, or variables without persistence, which may supersede or complement the various workarounds.

N4146: Disposition of Comments, ISO/IEC DIS 14882, C++ 2014 -- Barry Hedquist

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

Date: 2014-09-23

Disposition of Comments, ISO/IEC DIS 14882, C++ 2014

by Barry Hedquist

Excerpt:

Attached is WG21 N4146, the Disposition of Comments for ISO/IEC DIS 14882, Draft Information Standard ISO/IEC 14882:2014.

Document numbers referenced in the ballot comments are WG21 documents unless otherwise stated.

N4133: Cleanup for exception-specification and throw-expression -- Jens Maurer

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

Date: 2014-09-10

Cleanup for exception-specification and throw-expression

by Jens Maurer

Excerpt:

This paper proposes to adjust the wording for exceptions to achieve the following goals:

  • Exception specifications as a semantic concept are separated from the grammar term exception-specification
  • The description of throw-expression is integrated into clause 5.

The changes are intended to be editorial only, not changing semantics. Due to the size of the changes, it seems prudent to have a full CWG review for these instead of leaving the issue to the project editor alone.
 

N4132: Contiguous Iterators -- Jens Maurer

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

Date: 2014-09-10

Contiguous Iterators

by Jens Maurer

Excerpt:

There are four containers in the standard library that guarantee contiguous storage: vector, string, valarray, and array. In the Library Fundamentals TS, there is also string_view. This paper introduces the term "contiguous iterator" as a refinement of random-access iterator, without introducing a corresponding contiguous_iterator_tag, which was found to break code during the Issaquah discussions of Nevin Liber's paper N3884 "Contiguous Iterators: A Refinement of Random Access Iterators". 

Rapid prototyping and teaching ZeroMQ in C++ with biicode -- Diego Rodriguez-Losada

From the biicode beta product blog:

Rapid prototyping and teaching ZeroMQ in C++ with biicode

by Diego Rodriguez-Losada

From the article:

Today, if you try to build the basic C++ client-server example that ZeroMQ provides in their site, you might encounter some problems. You have to guess that the C++ binding is not in the library, instead, it’s inside another repo (zmqcpp). I had to google it myself to find it. You have to get, configure and build the library, then setup your own project to use it.

The question is: Given some example source code snippets that use zmq, can anyone, even unexperienced developers build them quickly and easily, even without writing a single line of configuration, in any of the major OS? We think that it can be done, in a few simple steps...