December 2023

PVS-Studio 7.28: support for ARM, analysis of Unreal Engine projects without Unity Build, and more

Now you can run the analyzer on the ARM architecture, analyze .NET 8 projects, and check Unreal Engine projects without Unity Build — and there is more to come.

PVS-Studio 7.28: support for ARM, .NET 8, analysis of Unreal Engine projects without Unity Build, and more

by Gleb Aslamov

From the article:

When analyzing Unreal Engine projects with PVS-Studio, we often encounter issues with high memory usage and analysis slowdown. They usually arise when individual translation units are combined into a single file (the Unity Build system). Although the merging of translation units may have a positive impact on the compilation time, the large file size may increase the resource requirements for analysis.

2023-12 Mailing Available

The 2023-12 mailing of new standards papers is now available.

 

WG21 Number Title Author Document Date Mailing Date Previous Version Subgroup
N4966 St. Louis Meeting Invitation and Information Bill Seymour 2023-10-19 2023-12   All of WG21
N4967 WG21 2023-10 Admin telecon minutes Nina Ranns 2023-10-30 2023-12   All of WG21
N4970 WG21 2023-11 Kona Minutes of Meeting Nina Ranns 2023-11-28 2023-12   All of WG21
N4971 Working Draft, Programming Languages -- C++ Thomas Köppe 2023-12-17 2023-12   All of WG21
N4972 Editors' Report, Programming Languages -- C++ Thomas Köppe 2023-12-17 2023-12   All of WG21
P0447R24 Introduction of std::hive to the standard library Matt Bentley 2023-10-25 2023-12 P0447R23 SG14 Low Latency,LEWG Library Evolution,All of WG21
P0447R25 Introduction of std::hive to the standard library Matt Bentley 2023-12-03 2023-12 P0447R24 SG14 Low Latency,LEWG Library Evolution,All of WG21
P0447R26 Introduction of std::hive to the standard library Matt Bentley 2023-12-17 2023-12 P0447R25 SG14 Low Latency,LEWG Library Evolution,All of WG21
P0609R2 Attributes for Structured Bindings Aaron Ballman 2023-11-27 2023-12 P0609R1 CWG Core
P0952R2 A new specification for std::generate_canonical Thomas Köppe 2023-12-18 2023-12 P0952R1 LWG Library
P1028R6 SG14 status_code and standard error object Niall Douglas 2023-12-10 2023-12 P1028R5 LEWG Library Evolution
P1061R6 Structured Bindings can introduce a Pack Barry Revzin 2023-12-10 2023-12 P1061R5 EWG Evolution
P1068R10 Vector API for random number generation Ilya Burylov 2023-12-09 2023-12 P1068R9 LWG Library
P1673R13 A free function linear algebra interface based on the BLAS Mark Hoemmen 2023-12-18 2023-12 P1673R12 All of WG21
P1708R8 Basic Statistics Richard Dosselmann 2023-12-17 2023-12 P1708R7 SG6 Numerics,SG14 Low Latency,LEWG Library Evolution,LWG Library
P1709R4 Graph Library Phillip Ratzloff 2023-12-18 2023-12 P1709R3 SG19 Machine Learning
P1709R4 Graph Library Phillip Ratzloff 2023-12-18 2023-12 P1709R3 SG19 Machine Learning
P1928R8 std::simd - Merge data-parallel types from the Parallelism TS 2 Matthias Kretz 2023-11-09 2023-12 P1928R7 LEWG Library Evolution,LWG Library
P1967R12 #embed - a simple, scannable preprocessor-based resource acquisition method JeanHeyd Meneide 2023-12-09 2023-12 P1967R11 CWG Core
P2022R3 Rangified version of lexicographical_compare_three_way Ran Regev 2023-12-17 2023-12 P2022R2 SG9 Ranges,LEWG Library Evolution
P2264R6 Make assert() macro user friendly for C and C++ Peter Sommerlad 2023-11-10 2023-12 P2264R5 LWG Library
P2264R7 Make assert() macro user friendly for C and C++ Peter Sommerlad 2023-12-18 2023-12 P2264R6 LWG Library
P2267R1 Library Evolution Policies Inbal Levi 2023-11-22 2023-12 P2267R0 LEWG Library Evolution
P2308R1 Template parameter initialization S. Davis Herring 2023-12-18 2023-12 P2308R0 CWG Core
P2414R2 Pointer lifetime-end zap proposed solutions Paul E. McKenney 2023-12-17 2023-12 P2414R1 SG1 Concurrency and Parallelism,EWG Evolution
P2447R6 std::span over an initializer list Arthur O'Dwyer 2023-12-18 2023-12 P2447R5 LWG Library
P2481R2 Forwarding reference to specific type/template Barry Revzin 2023-12-16 2023-12 P2481R1 EWG Evolution
P2542R7 views::concat Hui Xie 2023-12-02 2023-12 P2542R6 SG9 Ranges,LEWG Library Evolution,LWG Library
P2573R1 = delete("should have a reason"); Yihe Li 2023-11-10 2023-12 P2573R0 EWG Evolution
P2642R5 Padded mdspan layouts Christian Trott 2023-12-05 2023-12 P2642R4 LEWG Library Evolution,LWG Library
P2662R3 Pack Indexing Corentin Jabot 2023-12-18 2023-12 P2662R2 CWG Core
P2663R5 Proposal to support interleaved complex values in std::simd Daniel Towner 2023-12-08 2023-12 P2663R4 LEWG Library Evolution
P2664R5 Proposal to extend std::simd with permutation API Daniel Towner 2023-10-25 2023-12 P2664R4 SG1 Concurrency and Parallelism,LEWG Library Evolution
P2717R4 Tool Introspection René Ferdinand Rivera Morell 2023-11-08 2023-12 P2717R3 SG15 Tooling
P2717R5 Tool Introspection René Ferdinand Rivera Morell 2023-11-10 2023-12 P2717R4 SG15 Tooling
P2747R1 constexpr placement new Barry Revzin 2023-12-10 2023-12 P2747R0 EWG Evolution
P2758R1 Emitting messages at compile time Barry Revzin 2023-12-09 2023-12 P2758R0 EWG Evolution,LEWG Library Evolution
P2760R1 A Plan for C++26 Ranges Barry Revzin 2023-12-14 2023-12 P2760R0 SG9 Ranges,LEWG Library Evolution
P2761R0 Slides: If structured binding (P0963R1 presentation) Zhihao Yuan 2023-11-08 2023-12   EWGI SG17: EWG Incubator
P2767R2 flat_map/flat_set omnibus Arthur O'Dwyer 2023-12-09 2023-12 P2767R1 LEWG Library Evolution,LWG Library
P2795R4 Erroneous behaviour for uninitialized reads Thomas Köppe 2023-11-10 2023-12 P2795R3 SG12 Undefined and Unspecified Behavior,SG23 Safety and Security,EWG Evolution,CWG Core,LWG Library
P2806R2 do expressions Barry Revzin 2023-11-16 2023-12 P2806R1 EWG Evolution
P2810R2 is_debugger_present is_replaceable René Ferdinand Rivera Morell 2023-12-02 2023-12 P2810R1 LEWG Library Evolution
P2810R3 is_debugger_present is_replaceable René Ferdinand Rivera Morell 2023-12-03 2023-12 P2810R2 LEWG Library Evolution
P2819R2 Add tuple protocol to complex Michael Florian Hava 2023-12-18 2023-12 P2819R1 LWG Library
P2821R5 span.at() Jarrad J. Waterloo 2023-12-18 2023-12 P2821R4 SG23 Safety and Security,LEWG Library Evolution
P2826R1 Replacement functions Gašper Ažman 2023-11-05 2023-12 P2826R0 EWG Evolution
P2827R1 Floating-point overflow and underflow in from_chars (LWG 3081) Zhihao Yuan 2023-11-20 2023-12 P2827R0 LEWG Library Evolution,LWG Library
P2830R1 constexpr type comparison Gašper Ažman 2023-11-05 2023-12 P2830R0 EWG Evolution
P2845R5 Formatting of std::filesystem::path Victor Zverovich 2023-11-24 2023-12 P2845R4 LWG Library
P2863R3 Review Annex D for C++26 Alisdair Meredith 2023-12-18 2023-12 P2863R2 EWG Evolution,LEWG Library Evolution
P2864R2 Remove Deprecated Arithmetic Conversion on Enumerations From C++26 Alisdair Meredith 2023-12-18 2023-12 P2864R1 CWG Core
P2865R4 Remove Deprecated Array Comparisons from C++26 Alisdair Meredith 2023-11-12 2023-12 P2865R3 SG22 Compatibility
P2868R3 Remove Deprecated `std::allocator` Typedef From C++26 Alisdair Meredith 2023-12-18 2023-12 P2868R2 LWG Library
P2869R3 Remove Deprecated `shared_ptr` Atomic Access APIs From C++26 Alisdair Meredith 2023-12-03 2023-12 P2869R2 LEWG Library Evolution,LWG Library
P2870R3 Remove `basic_string::reserve()` From C++26 Alisdair Meredith 2023-12-18 2023-12 P2870R2 LWG Library
P2871R3 Remove Deprecated Unicode Conversion Facets From C++26 Alisdair Meredith 2023-12-18 2023-12 P2871R2 LWG Library
P2878R6 Reference checking Jarrad J. Waterloo 2023-11-13 2023-12 P2878R5 SG23 Safety and Security
P2890R1 Contracts on lambdas Timur Doumler 2023-12-07 2023-12 P2890R0 SG21 Contracts
P2890R2 Contracts on lambdas Timur Doumler 2023-12-13 2023-12 P2890R1 SG21 Contracts
P2894R1 Constant evaluation of Contracts Timur Doumler 2023-12-07 2023-12 P2894R0 SG21 Contracts
P2900R2 Contracts for C++ Joshua Berne 2023-11-11 2023-12 P2900R1 SG21 Contracts
P2900R3 Contracts for C++ Joshua Berne 2023-12-17 2023-12 P2900R2 SG21 Contracts
P2909R3 Fix formatting of code units as integers (Dude, where's my char?) Victor Zverovich 2023-11-07 2023-12 P2909R2 LWG Library
P2909R4 Fix formatting of code units as integers (Dude, where's my char?) Victor Zverovich 2023-12-18 2023-12 P2909R3 LWG Library
P2918R2 Runtime format strings II Victor Zverovich 2023-12-18 2023-12 P2918R1 LWG Library
P2932R2 A Principled Approach to Open Design Questions for Contracts Joshua Berne 2023-11-14 2023-12 P2932R1 SG21 Contracts
P2933R1 std::simd overloads for <bit> header Daniel Towner 2023-12-08 2023-12 P2933R0 SG1 Concurrency and Parallelism,LEWG Library Evolution
P2935R4 An Attribute-Like Syntax for Contracts Joshua Berne 2023-11-05 2023-12 P2935R3 SG21 Contracts
P2952R1 auto& operator=(X&&) = default Arthur O'Dwyer 2023-12-09 2023-12 P2952R0 EWG Evolution
P2961R2 A natural syntax for Contracts Timur Doumler 2023-11-08 2023-12 P2961R1 SG21 Contracts
P2968R1 Make std::ignore a first-class object Peter Sommerlad 2023-12-12 2023-12 P2968R0 LEWG Library Evolution,LWG Library
P2968R2 Make std::ignore a first-class object Peter Sommerlad 2023-12-13 2023-12 P2968R1 LWG Library
P2969R0 Contract annotations are potentially-throwing Timur Doumler 2023-12-04 2023-12   SG21 Contracts
P2977R0 Module commands database format Ben Boeckel 2023-11-14 2023-12   SG15 Tooling
P2980R1 A motivation, scope, and plan for a quantities and units library Mateusz Pusz 2023-11-28 2023-12 P2980R0 SG6 Numerics,SG23 Safety and Security,LEWG Library Evolution
P2981R1 Improving our safety with a physical quantities and units library Mateusz Pusz 2023-11-08 2023-12 P2981R0 SG23 Safety and Security,LEWG Library Evolution
P2982R1 `std::quantity` as a numeric type Mateusz Pusz 2023-11-08 2023-12 P2982R0 SG6 Numerics,LEWG Library Evolution
P2984R1 Reconsider Redeclaring static constexpr Data Members Alisdair Meredith 2023-11-12 2023-12 P2984R0 EWG Evolution
P2996R1 Reflection for C++26 Barry Revzin 2023-12-17 2023-12 P2996R0 EWG Evolution
P2999R1 Sender Algorithm Customization Eric Niebler 2023-11-09 2023-12 P2999R0 LEWG Library Evolution
P2999R2 Sender Algorithm Customization Eric Niebler 2023-12-12 2023-12 P2999R1 LEWG Library Evolution
P2999R3 Sender Algorithm Customization Eric Niebler 2023-12-12 2023-12 P2999R2 LEWG Library Evolution
P3006R0 Launder less Antony Polukhin 2023-10-19 2023-12   SG12 Undefined and Unspecified Behavior,EWG Evolution,CWG Core
P3007R0 Return object semantics in postconditions Timur Doumler 2023-12-11 2023-12   SG21 Contracts
P3016R1 Resolve inconsistencies in begin/end for valarray and braced initializer lists Arthur O'Dwyer 2023-12-09 2023-12 P3016R0 LEWGI SG18: LEWG Incubator
P3019R1 Vocabulary Types for Composite Class Design Jonathan Coe 2023-11-08 2023-12 P3019R0 LEWG Library Evolution,LWG Library
P3019R2 Vocabulary Types for Composite Class Design Jonathan Coe 2023-11-10 2023-12 P3019R1 LEWG Library Evolution,LWG Library
P3019R3 Vocabulary Types for Composite Class Design Jonathan Coe 2023-11-20 2023-12 P3019R2 LEWG Library Evolution
P3022R1 A Boring Thread Attributes Interface David Sankel 2023-11-28 2023-12 P3022R0 LEWG Library Evolution
P3023R1 C++ Should Be C++ David Sankel 2023-11-27 2023-12 P3023R0 EWG Evolution,LEWG Library Evolution
P3024R0 Interface Directions for std::simd David Sankel 2023-11-30 2023-12   LEWG Library Evolution
P3025R0 SG14: Low Latency/Games/Embedded/Financial trading/Simulation virtual Minutes to 2023/09/12 Michael Wong 2023-10-15 2023-12   SG14 Low Latency
P3026R0 SG19: Machine Learning virtual Meeting Minutes to 2023/07/13 Michael Wong 2023-10-15 2023-12   SG19 Machine Learning
P3027R0 UFCS is a breaking change, of the absolutely worst kind Ville Voutilainen 2023-10-26 2023-12   EWG Evolution
P3028R0 An Overview of Syntax Choices for Contracts Joshua Berne 2023-11-05 2023-12   SG21 Contracts
P3029R0 Better mdspan's CTAD Hewill Kang 2023-10-23 2023-12   LEWGI SG18: LEWG Incubator
P3031R0 Resolve CWG2561: conversion function for lambda with explicit object parameter Arthur O'Dwyer 2023-11-12 2023-12   CWG Core
P3033R0 Should we import function bodies to get the better optimizations? Chuanqi Xu 2023-10-31 2023-12   SG15 Tooling
P3034R0 Module Declarations Shouldn't be Macros Michael Spencer 2023-11-10 2023-12   SG15 Tooling,EWG Evolution
P3037R0 constexpr std::shared_ptr Paul Keir 2023-11-06 2023-12   SG7 Reflection,LEWG Library Evolution
P3038R0 Concrete suggestions for initial Profiles Bjarne Stroustrup 2023-12-16 2023-12   SG23 Safety and Security
P3039R0 Automatically Generate `operator->` David Stone 2023-11-07 2023-12   EWG Evolution,LEWG Library Evolution
P3040R0 C++ Standard Library Ready Issues to be moved in Kona, Nov. 2023 Jonathan Wakely 2023-12-18 2023-12   All of WG21
P3041R0 Transitioning from "#include" World to Modules Gabriel Dos Reis 2023-11-15 2023-12   SG15 Tooling
P3042R0 Vocabulary Types for Composite Class Design Jonathan Coe 2023-11-08 2023-12   LEWG Library Evolution
P3043R0 Slides: Using variable template template without meta programming Zhihao Yuan 2023-12-11 2023-12   EWG Evolution
P3046R0 Core Language Working Group "ready" Issues for the November, 2023 meeting Jens Maurer 2023-12-18 2023-12   CWG Core
P3050R0 Optimize linalg::conjugated for noncomplex value types Mark Hoemmen 2023-11-15 2023-12   LEWG Library Evolution
P3051R0 Structured Response Files René Ferdinand Rivera Morell 2023-12-11 2023-12   SG15 Tooling
P3052R0 view_interface::at() Hewill Kang 2023-11-16 2023-12   SG9 Ranges,LEWGI SG18: LEWG Incubator,SG23 Safety and Security
P3053R0 2023-12 Library Evolution Polls Inbal Levi 2023-12-15 2023-12   All of WG21
P3055R0 Relax wording to permit relocation optimizations in the STL Arthur O'Dwyer 2023-12-17 2023-12   LEWGI SG18: LEWG Incubator
P3056R0 what ostream exception Jarrad J. Waterloo 2023-11-20 2023-12   LEWG Library Evolution
P3057R0 Two finer-grained compilation model for named modules Chuanqi Xu 2023-11-21 2023-12   SG15 Tooling
P3059R0 Making user-defined constructors of view iterators/sentinels private Hewill Kang 2023-11-30 2023-12   SG9 Ranges,LEWG Library Evolution
P3060R0 Add std::ranges::upto(n) Weile Wei 2023-11-22 2023-12   LEWG Library Evolution
P3061R0 WG21 2023-11 Kona Record of Discussion Nina Ranns 2023-11-28 2023-12   All of WG21
P3062R0 C++ Should Be C++ - Presentation David Sankel 2023-11-27 2023-12   EWG Evolution,LEWG Library Evolution
P3066R0 Allow repeating contract annotations on non-first declarations Timur Doumler 2023-12-04 2023-12   SG21 Contracts
P3070R0 Formatting enums Victor Zverovich 2023-12-14 2023-12   SG16 Unicode
P3071R0 Protection against modifications in contracts Jens Maurer 2023-12-10 2023-12   SG21 Contracts
P3071R1 Protection against modifications in contracts Jens Maurer 2023-12-17 2023-12 P3071R0 SG21 Contracts
P3072R0 Hassle-free thread attributes Zhihao Yuan 2023-12-17 2023-12   LEWG Library Evolution
P3074R0 constexpr union lifetime Barry Revzin 2023-12-15 2023-12   EWG Evolution
P3075R0 Adding an Undefined Behavior and IFNDR Annex Shafik Yaghmour 2023-12-15 2023-12   CWG Core

Striving For Better C++ Code, Part I: Data Flow Analysis Basics -- Anastasia Kazakova

Anastasia-200x200.jpgWe’ll look at the basics of data flow analysis, including how it works in general, while presenting several real-world examples where it can help you write better code.

Striving For Better C++ Code, Part I: Data Flow Analysis Basics

by Anastasia Kazakova

From the article:

All data flow inspections rely on the control-flow graph. This is a graph on which vertices are the statements in the program and edges are the control flow jumps between these statements (direct code execution, conditional jumps, loops, breaks, gotos, etc.).

For example, the control-flow graph at the right represents the function foo on the left:

basic_sample_scheme.png

How to use std::span from C++20 -- Bartlomiej Filipek

How_to_use_std_span_from_C++20.pngIn this article, we’ll look at std::span which is more generic than string_view and can help work with arbitrary contiguous collections.

How to use std::span from C++20

by Bartlomiej Filipek

From the article:

Here’s an example that illustrates the primary use case for std::span:

In traditional C (or low-level C++), you’d pass an array to a function using a pointer and a size like this:

void process_array(int* arr, std::size_t size) {
  for(std::size_t i = 0; i < size; ++i) {
    // do something with arr[i]
  }
}

std::span simplifies the above code:

void process_array(std::span<int> arr_span) {
  for(auto& elem : arr_span) {  
    // do something with elem  
  } 
} 

The need to pass a separate size variable is eliminated, making your code less error-prone and more expressive.