Meeting 9 November 2017

CppCon 2017 Trip Report by KDAB

Blog post

Catch2

New:

  • Requires C++11
  • Clara: a composable command line processor, GitHub, video
  • Commas in assertions
1REQUIRE( getPair() == std::pair<true, "banana">() );
  • Microbenchmarking (experimental)

Future plans

Transwarp

Transwarp is a header-only C++ library for task concurrency. It enables you to free your functors from explicit threads and transparently manage dependencies. Under the hood, a directed acyclic graph is built that allows for efficient traversal and type-safe dependencies. Use transwarp if you want to model your dependent operations in a graph of tasks and intend to invoke the graph more than once (MIT).

Don’t use C++ auto?

Article

Optimizing software in C++, by Agner Fog

PDF

This manual is for advanced programmers and software developers who want to make their software faster. It is assumed that the reader has a good knowledge of the C++ programming language and a basic understanding of how compilers work.

The recommendations are based on the x86 family of microprocessors from Intel, AMD and VIA including the 64-bit versions.

ULID: Universally Unique Lexicographically Sortable Identifier

  • GitHub
  • C++ — header-only, MIT
  • 128-bit compatibility with UUID
  • 1.21e+24 unique ULIDs per millisecond
  • Lexicographically sortable!
  • Canonically encoded as a 26 character string, as opposed to the 36 character UUID
  • Uses Crockford’s base32 for better efficiency and readability (5 bits per character)
  • Case insensitive
  • No special characters (URL safe)
  • Monotonic sort order (correctly detects and handles the same millisecond)

Ctla: Compile-time linear algebra in C++

GitHub (MIT)

  • Header-only library
  • All functions constexpr, all computation done at compile time
  • Intuitive syntax for initialisation, indexing, augmenting
  • Matrix arithmetic including inverses and linear systems supported
  • Block matrices supported
  • Runtime printing in MATLAB-compatible syntax if required

Static-regexp by Hana Dusíková

GitHub (MIT)

Very fast regexp using C++11 templates.

Timertt 1.2.0: A library for working with timers

Pacific++ Conference in New Zealand

CppCon 2017: Barbara Geller & Ansel Sermersheim - Unicode Strings: Why the Implementation Matters

  • Unicode introduction
  • You cannot interpret a sequence of characters without knowing the encoding
  • std::string or std::wstring have no way to specify encoding
  • MFC, Java, C#, QT: UCS-2, UTF-16
  • .NET TextField length is specified in storage units => can crash .NET runtime
  • CsString

CsString

A library providing Unicode-aware string support for C++.

  • GitHub (BSD 2-clause)
  • Docs
  • Header-only, C++11
  • Separates encoding from storage
  • Extensively tested
  • Part of CopperSpice

Most-disliked programming languages on StackOverflow