News

Access tuple-like container by type to return an index -- Krzysztof Ostrowski

How would you look for an item in a tuple by the item's type, and return the item's index within that tuple?

Access tuple-like container by type to return an index

by Krzysztof Ostrowski

From the article:

Presentation of a technique that composes an application of a lazy fold expression, and an idea of type embellishment that introduces an implicit context in which the current tuple element is embedded.

C++ on Sea 2020 - Call for Speakers is open

The Call for Speakers is now open, and will run until the end of November.

by C++ on Sea

by C++ on Sea

From the article:

If you're interested in presenting a 60 minute or 90 minute talk, or a one day workshop, please visit the above link to go to the Call For Speakers page for more information and a link to the Speaker Portal.

C/C++ Include Guidelines -- Thomas Young

Good practices for setting up include files are key to keeping large code-bases manageable, in pre-modules C++, and this article presents 15 rules to keep you on the right track.

C/C++ Include Guidelines

by Thomas Young

From the article:

The rules listed here are relatively mechanical, by which I mean that these are things that can be applied locally to individual bits of source code, without strokes of genius or flashes of inspiration, but with the possibility to nevertheless significantly improve code organisation, which is useful particularly in the case of large legacy code bases.

CopperSpice: std::variant

New video on the CopperSpice YouTube Channel:

std::variant

by Barbara Geller and Ansel Sermersheim

About the video:

In this video, we discuss the std::variant class and its relationship to C++ unions. We explore the drawbacks and constraints of the union abstraction in C++, how they changed in C++11, and how variant addresses many of these shortcomings.

Please take a look and remember to subscribe!

Generate stub code from Gherkin DSL -- Zebedee Mason

A small Gherkin DSL parser that generates stub code

Cornichon

by Zebedee Mason

From the article:

The supported frameworks are:

  • cpp/cppunittest - Microsoft's Visual C++ test framework
  • cpp/googletest - Google Test

How to Merge Consecutive Elements in a C++ Collection--Jonathan Boccara

Simple and sweet.

How to Merge Consecutive Elements in a C++ Collection

by Jonathan Boccara

From the article:

Merging identical consecutive elements in a collection is a recurring need, in C++ or elsewhere in programming.

For example, we could want to aggregate a collection of hourly results into a collection of daily results: all the results of each day get aggregated into one for that day. In this case, being “identical” means being on the same day, and “aggregating” means taking two results with a common date, and creating a result at this date and with the sum of their amounts...

Overload 153 is now available

ACCU’s Overload journal of October 2019 is out. It contains the following C++ related articles.

Overload 153 is now available

From the journal:

Predictions and Predilections.
Forecasting the future is difficult. Frances Buontempo has a foreboding sense that a lack of impartially makes things even harder.

Scenarios Using Custom DSLs.
Natural-language BDD can be hard to maintain. Liz Keogh demonstrates a simple code-based alternative.

OOP Is not Essential.
People tend to love or hate Object Oriented Programming. Lucian Teodorescu considers a recent OOP claim.

I Come Here Not to Bury Delphi, But to Praise It.
What helps a programming language gain traction? Patrick Martin remembers why he used to use Delphi.

C++ Pipes.
Expressive code can make life easier. Jonathan Boccara demonstrates fluent pipelines for collections in C++.

2019-10 pre-Belfast mailing available (2 of 2)

The 2019-10 mailing of new standards papers is now available.

 

P1750R1 A Proposal to Add Process Management to the C++ Standard Library Klemans Morgenstern, Jeff Garland, Elias Kosunen, Fatih Bakir 2019-10-07 2019-10 P1750R0 SG1, LEWGI  
P1772R1 Variadic overload sets and overload sequences Vincent Reverdy 2019-10-06 2019-10 P1772R0 SG7, EWGI  
P1774R1 Portable optimisation hints Timur Doumler 2019-10-06 2019-10 P1774R0 SG21, EWGI, Evolution  
P1787R2 Declarations and where to find them S. Davis Herring 2019-10-05 2019-10 P1787R1 Core  
P1795R1 System topology discovery for heterogeneous & distributed computing Gordon Brown, Ruyman Reyes, Michael Wong, Mark Hoemmen, Jeff Hammond, Tom Scogland, Domagoj Šarić 2019-10-08 2019-10 P1795R0 SG1, SG14  
P1820R0 Recommendations for a compromise on handling errors and cancellations in executors Gordon Brown 2019-10-08 2019-10   SG1, Library Evolution  
P1830R1 std::dependent_false Ruslan Arutyunyan 2019-10-07 2019-10 P1830R0 LEWGI  
P1839R1 Accessing Object Representations Krystian Stasiowski 2019-10-02 2019-10 P1839R0 Core  
P1847R1 Make declaration order layout mandated Pal Balog 2019-10-01 2019-10 P1847R0 Evolution  
P1854R0 Conversion to execution encoding should not lead to loss of meaning Corentin Jabot 2019-10-06 2019-10   SG16, Evolution  
P1855R0 Make <compare> freestanding Ben Craig, Bryce Adelstein Lelbach 2019-10-05 2019-10   Library Evolution  
P1856R0 Bit operations do not work on bytes: a generic fix Vincent Reverdy 2019-10-07 2019-10   Library Evolution, Library  
P1857R0 Modules Dependency Discovery Michael Spencer 2019-10-07 2019-10   SG2, SG15, Evolution  
P1857R1 Modules Dependency Discovery Michael Spencer 2019-10-07 2019-10 P1857R0 SG2, SG15, Evolution  
P1858R0 Generalized pack declaration and usage Barry Revzin 2019-10-07 2019-10   Evolution  
P1859R0 Standard terminology for execution character set encodings Steve Downey 2019-10-09 2019-10   SG16, Evolution, Core  
P1860R0 C++ Networking Must Be Secure By Default JF Bastien, Alex Christensen 2019-10-07 2019-10   Library Evolution  
P1861R0 Secure Connections in Networking TS JF Bastien, Alex Christensen 2019-10-07 2019-10   Library Evolution  
P1862R0 Ranges adaptors for non-copyable iterators Corentin Jabot 2019-10-06 2019-10   Library Evolution, Library  
P1865R0 Add max() to latch and barrier David Olsen, Olivier Giroux 2019-09-30 2019-10   Library Evolution, Library  
P1868R0 ? width: clarifying units of width and precision in std::format Victor Zverovich, Zach Laine 2019-10-05 2019-10   SG16, Library Evolution  
P1869R0 Rename 'condition_variable_any' interruptible wait methods Tomasz Kamiński, Michał Dominiak 2019-10-01 2019-10   Library Evolution  
P1870R0 forwarding-range is too subtle Barry Revzin 2019-10-07 2019-10   Library Evolution  
P1871R0 Should concepts be enabled or disabled? Barry Revzin 2019-10-07 2019-10   Library Evolution  
P1872R0 span should have size_type, not index_type Nevin Liber 2019-10-07 2019-10   Library Evolution  
P1873R0 remove.dots.in.module.names Michael Spencer 2019-10-07 2019-10   SG2, Evolution  
P1873R1 remove.dots.in.module.names Michael Spencer 2019-10-07 2019-10 P1873R0 SG2, Evolution  
P1874R0 Dynamic Initialization Order of Non-Local Variables in Modules Michael Spencer 2019-10-07 2019-10   SG2, Evolution  
P1875R0 Transactional Memory Lite Support in C++ Michael Spear, Hans Boehm, Victor Luchangco, Michael Scott, Michael Wong 2019-10-07 2019-10   SG1  
P1876R0 All The Module Names Rene Rivera 2019-10-04 2019-10   SG15  
P1876R1 All The Module Names Rene Rivera 2019-10-08 2019-10 P1876R0 SG2  
P1877R0 Saving Private Ranges: Recovering Lost Information from Comparison and Predicate Algorithms JeanHeyd Meneide 2019-10-07 2019-10   Library Evolution  
P1878R0 Constraining Readable Types Eric Niebler, Casey Carter 2019-10-04 2019-10   Library  
P1879R0 Please Don't Rewrite My String Literals Zach Laine 2019-10-06 2019-10   SG16, EWGI  
P1880R0 uNstring Arguments Shall Be UTF-N Encoded Zach Laine 2019-10-06 2019-10   SG16, LEWGI  
P1881R0 Epochs: a backward-compatible language evolution mechanism Vittorio Romeo 2019-10-06 2019-10   EWGI  
P1882R0 Addition of a filter to recursive_directory_iterator Noel Tchidjo Moyo 2019-09-26 2019-10   EWGI  
P1883R0 Walkthrough of P1031s file_handle for LEWG-I Niall Douglas 2019-09-26 2019-10   LEWGI  
P1885R0 Naming Text Encodings to Demystify Them Corentin Jabot 2019-10-06 2019-10   SG16, Library Evolution  
P1886R0 Error speed benchmarking Ben Craig 2019-10-05 2019-10   SG14, Direction Group  
P1887R0 Typesafe Reflection on attributes Corentin Jabot 2019-10-06 2019-10   SG7  
P1888R0 Executors without exception handling support Matti Rintala, Matti Rintala, Michael Wong, David S. Hollman, Pekka Jääskeläinen 2019-10-07 2019-10   SG1  
P1889R0 C++ Numerics Work In Progress Alexander Zaitsev, Antony Polukhin 2019-10-01 2019-10   SG6  
P1890R0 C++ Numerics Work In Progress Issues Antony Polukhin, Alexander Zaitsev 2019-10-01 2019-10   SG6  
P1891R0 The Linear-Algebra Effort Guy Davidson, Mark Hoemmen, David Hollman, Bob Steagall, Christian Trott 2019-10-13 2019-10   SG6, SG14, SG19, Library Evolution  
P1892R0 Extended locale-specific presentation specifiers for std::format Peter Brett 2019-10-07 2019-10   SG16, LEWGI  
P1893R0 Proposal of Contract Primitives Andrew Tomazos 2019-10-01 2019-10   SG21  
P1894R0 Proposal of std::upto, std::indices and std::enumerate Andrew Tomazos 2019-10-02 2019-10   LEWGI  
P1895R0 tag_invoke: A general pattern for supporting customisable functions Lewis Baker, Eric Niebler, Kirk Shoop 2019-10-08 2019-10   Library Evolution  
P1896R0 SG16: Unicode meeting summaries 2019/06/12 - 2019/09/25 Tom Honermann 2019-10-02 2019-10   SG16  
P1897R0 Towards C++23 executors: An initial set of algorithms Lee Howes 2019-10-07 2019-10   SG1  
P1898R0 Forward progress delegation for executors Lee Howes 2019-10-07 2019-10   SG1  
P1899R0 stride_view Christopher Di Bella 2019-10-07 2019-10   Library Evolution  
P1900R0 Concepts-Adjacent Problems Barry Revzin 2019-10-07 2019-10   Evolution  
P1901R0 Enabling the Use of weak_ptr as Keys in Unordered Associative Containers Daryl Haresign 2019-10-03 2019-10   Library Evolution  
P1902R0 Missing feature-test macros 2018-2019 Barry Revzin 2019-10-07 2019-10   Evolution, Library Evolution  
P1905R0 In-Source Mechanism to Identify Importable Headers Corentin Jabot 2019-10-06 2019-10   SG15, Evolution  
P1906R0 Provided operator= return lvalue-ref on rvalue Peter Sommerlad 2019-10-07 2019-10   SG12, EWGI, Evolution, Core  
P1907R0 Inconsistencies with non-type template parameters Jens Maurer 2019-10-07 2019-10   Evolution  
P1908R0 Reserving Attribute Names for Future Use Corentin Jabot 2019-10-06 2019-10   Evolution  
P1912R0 Interconvertible object representations Timur Doumler 2019-10-06 2019-10   EWGI, Evolution  
P1913R0 Comments on Audio Devices Frank Birbacher 2019-10-06 2019-10   SG13  
P1914R0 On the names of shift algorithms Vincent Reverdy 2019-10-07 2019-10   Library Evolution, Library  
P1915R0 Expected Feedback from simd in the Parallelism TS 2 Matthias Kretz 2019-10-07 2019-10   SG1, Library Evolution  
P1916R0 There might not be an elegant OOTA fix David Goldblatt 2019-10-07 2019-10   SG1  
P1917R0 C++ Library Issues to be moved in Belfast Marshall Clow 2019-10-07 2019-10   WG21  
P1919R0 Expanding the Rights in SD-8 Nevin Liber 2019-10-07 2019-10   Library Evolution  
P1920R0 Proposal of Namespace Templates Andrew Tomazos 2019-10-07 2019-10   EWGI  
P1921R0 What's in a Name? Nevin Liber 2019-10-07 2019-10   Library Evolution  
P1922R0 Making std::list constexpr Alexander Zaitsev 2019-10-07 2019-10   LEWGI  
P1923R0 Making std::deque constexpr Alexander Zaitsev 2019-10-07 2019-10   LEWGI  
P1924R0 Making std::stack constexpr Alexander Zaitsev 2019-10-07 2019-10   LEWGI  
P1925R0 Making std::queue constexpr Alexander Zaitsev 2019-10-07 2019-10   LEWGI  
P1926R0 Making std::priority_queue constexpr Alexander Zaitsev 2019-10-07 2019-10   LEWGI  
P1927R0 Add std::is_partitioned_until algorithm Alexander Zaitsev 2019-10-07 2019-10   LEWGI  
P1928R0 Merge data-parallel types from the Parallelism TS 2 Matthias Kretz 2019-10-07 2019-10   SG1  
P1929R0 Making std::forward_list constexpr Alexander Zaitsev 2019-10-07 2019-10   LEWGI  
P1930R0 Towards a standard unit systems library Vincent Reverdy 2019-10-07 2019-10   SG6, LEWGI  
P1932R0 Extension of the C++ random number generators Pavel Dyakov, Ilya Burylov; Ruslan Arutyunyan; Andrey Nikolaev 2019-10-07 2019-10   SG6  
P1933R0 Suggestions for bulk_execute Jared Hoberock 2019-10-07 2019-10   SG1  
P1936R0 Dependent Static Assertion Ruslan Arutyunyan 2019-10-07 2019-10   EWGI  
P1937R0 Fixing inconsistencies between `constexpr` and `consteval` functions David Stone 2019-10-07 2019-10   Evolution  
P1938R0 if consteval Barry Revzin, Daveed Vandevoorde, Richard Smith 2019-10-10 2019-10   Evolution  
P1943R0 Networking TS changes to improve completion token flexibility and performance Christopher Kohlhoff 2019-10-07 2019-10   SG1, Library Evolution