1
6
submitted 1 week ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

cross-posted from: https://lemmy.ml/post/42242801

Major new features:

  • The ISO C23 free_sized, free_aligned_sized, memset_explicit, and memalignment functions have been added.

  • As specified in ISO C23, the assert macro is defined to take variable arguments to support expressions with a comma inside a compound literal initializer not surrounded by parentheses.

  • For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the input argument is a pointer to a const-qualified type.

  • The ISO C23 typedef names long_double_t, _Float32_t, _Float64_t, and (on platforms supporting _Float128) _Float128_t, introduced in TS 18661-3:2015, have been added to <math.h>.

  • The ISO C23 optional time bases TIME_MONOTONIC, TIME_ACTIVE, and TIME_THREAD_ACTIVE have been added.

  • On Linux, the mseal function has been added. It allows for sealing memory mappings to prevent further changes during process execution, such as changes to protection permissions, unmapping, relocation to another location, or shrinking the size.

  • Additional optimized and correctly rounded mathematical functions have been imported from the CORE-MATH project, in particular acosh, asinh, atanh, erf, erfc, lgamma, and tgamma.

  • Optimized implementations for fma, fmaf, remainder, remaindef, frexpf, frexp, frexpl (binary128), and frexpl (intel96) have been added.

  • The SVID handling for acosf, acoshf, asinhf, atan2f, atanhf, coshf, fmodf, lgammaf/lgammaf_r, log10f, remainderf, sinhf, sqrtf, tgammaf, y0/j0, y1/j1, and yn/jn was moved to compat symbols, allowing improvements in performance.

  • Experimental support for building with clang has been added. It requires at least clang version 18, aarch64-linux-gnu or x86_64-linux-gnu targets, and a libgcc compatible runtime (including libgcc_s.so for pthread cancellation and backtrace runtime support).

  • On Linux, the openat2 function has been added. It is an extension of openat and provides a superset of its functionality. It is supported only in LFS mode and is a cancellable entrypoint.

  • On AArch64, support for 2MB transparent huge pages has been enabled by default in malloc (similar to setting glibc.malloc.hugetlb=1 tunable).

  • On AArch64 Linux targets supporting the Scalable Matrix Extension (SME), the clone() system call wrapper will disable the ZA state of the SME.

  • On AArch64 targets supporting the Branch Target Identification (BTI) extension, it is possible to enforce that all binaries in the process support BTI using the glibc.cpu.aarch64_bti tunable.

  • On AArch64 Linux targets supporting at least one of the branch protection extensions (e.g. Branch Target Identification or Guarded Control Stack), it is possible to use LD_DEBUG=security to make the dynamic linker show warning messages about loaded binaries that do not support the corresponding security feature.

  • On AArch64, vector variants of the new C23 exp2m1, exp10m1, log10p1, log2p1, and rsqrt routines have been added.

  • On RISC-V, an RVV-optimized implementation of memset has been added.

  • On x86, support for the Intel Nova Lake and Wildcat Lake processors has been added.

  • The test suite has seen significant improvements in particular around the scanf, strerror, strsignal functions and multithreaded testing.

  • Unicode support has been updated to Unicode 17.0.0.

  • The manual has been updated and modernized, in particular also regarding many of its code examples.

2
5
submitted 2 weeks ago by greenbelt@lemy.lol to c/cpp@lemmy.ml
3
1
submitted 1 month ago by monica_b1998@lemmy.world to c/cpp@lemmy.ml
4
5
C++ resources (github.com)
submitted 2 months ago by monica_b1998@lemmy.world to c/cpp@lemmy.ml
5
4
submitted 3 months ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

cross-posted from: https://lemmy.ml/post/38276124

Qt Creator 18 adds experimental support for Development Containers and many more improvements.

6
1
Qt 6.10 Released (www.qt.io)
submitted 3 months ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

cross-posted from: https://lemmy.ml/post/37356936

Qt 6.10 is now available, with new features and improvements for application developers and device creators!

Highlights for UI builders include a new flex-box layout system for Qt Quick, and support for more vector animations in SVG and Lottie format. And we have listened to your feedback and made it easier to exchange data between C++ code and a Qt Quick UI developed in QML. Such data can then be used with the new SearchField control, or with a new FilledSurface graph from the Qt Graphs module.

If you prefer to maintain your existing codebase, upgrading to Qt 6.10 ensures your application automatically aligns with high-contrast system settings on both desktop and mobile platforms. This and other improvements in our accessibility implementation directly benefits users reliant on assistive technologies, improving usability and inclusivity without requiring any additional development effort.

In addition to these highlights, new APIs across the Qt modules bring increased flexibility and productivity for both QML and C++ developers, and for users of Qt Widgets and Qt Quick.

7
7
submitted 8 months ago by HungryLemon@lemmings.world to c/cpp@lemmy.ml

Hi! Can you recommend some C++ libraries for making GUI interface? Also I know Tiled the Map Editor for creating maps for games, and I'm looking for some app for creating Graphical Interfaces for my future apps with a scaling elements feature (as I can do this in InkScape for example), and with many other features also. But I don't wanna use Qt.

So, I'm looking for:

  1. A C++ GUI library.
  2. An app for layouting of my future app.
  3. It doesn't will be Qt.

Thanks in advance! 😉

8
5
Vcc - the Vulkan Clang Compiler (shady-gang.github.io)
submitted 8 months ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

cross-posted from: https://lemmy.ml/post/31246361

Vcc - the Vulkan Clang Compiler, is a proof-of-concept C and C++ compiler for Vulkan leveraging Clang as a front-end, and Shady our own research IR and compiler. Unlike other shading languages, Vcc aims to stick closely to standard C/C++ languages and merely adds a few new intrinsics to cover GPU features. Vcc is similar to CUDA or Metal in this regard, and aims to bring the advantages of standard host languages to Vulkan shaders.

Key Features

Vcc supports advanced C/C++ features usually left out of shading languages such as HLSL or GLSL, in particular raising the bar when it comes to pointer support and control-flow:

  • Unrestricted pointers
    • Arithmetic is legal, they can be bitcasted to and from integers
  • Generic pointers
    • Generic pointers do not have an address space in their type, rather they carry the address space as a tag in the upper bits.
  • True function calls
    • Including recursion, a stack is implemented to handle this in the general case
  • Function pointers
    • Lets you write code in a functional style on the GPU without limitations
  • Arbitrary goto statements - code does not need to be strictly structured !

Many of these capabilities are present in compute APIs, but are not supported in most graphics APIs such as DirectX or Vulkan. We aim to address this gap by proving these features can and should be implemented. More on why we think that’s important.

9
7
New C++ features in GCC 15 (developers.redhat.com)
submitted 9 months ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

Like every major GCC release, this version will bring many additions, improvements, bug fixes, and new features. GCC 15 is already the system compiler in Fedora 42. Red Hat Enterprise Linux (RHEL) users will get GCC 15 in the Red Hat GCC Toolset. It's also possible to try GCC 15 on Compiler Explorer and similar pages.

This article describes only new features implemented in the C++ front end; it does not discuss developments in the C++ language itself.

The default dialect in GCC 15 is still -std=gnu++17. You can use the -std=c++23 or -std=gnu++23 command-line options to enable C++23 features, and similarly for C++26 and others.

10
7
submitted 9 months ago by corvus@lemmy.ml to c/cpp@lemmy.ml

Using the -j option is ignored. About two weeks ago I found out that cmake was compiling with only one thread but everything was ok a couple of months ago. I'm using Debian Trixie which is still in testing so I thought it was a bug, but after many system updates I didn't saw cmake being updated. I couldn't find anything after a some searches. Another related issue is that I recently compiled a new version of a qt app with an edit box to set the number of threads for running LLMs, after the last compilation it doesn't allow to set more than one. Any clue?

11
11
6 usability improvements in GCC 15 (developers.redhat.com)
submitted 10 months ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

cross-posted from: https://lemmy.ml/post/28413957

I work at Red Hat on GCC, the GNU Compiler Collection. I spent most of the past year working on how GCC emits diagnostics (errors and warnings) in the hope of making it easier to use. Let's take a look at 6 improvements to look forward to in the upcoming GCC 15.

  1. Prettier execution paths
  2. A new look for C++ template errors
  3. Machine-readable diagnostics
  4. An easier transition to C23
  5. A revamped color scheme
  6. libgdiagnostics
12
8
Qt 6.9 released (www.qt.io)
submitted 10 months ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

cross-posted from: https://lemmy.ml/post/28018658

Qt 6.9 is here! This release brings exciting innovations, enhanced graphics performance, and new platform capabilities to help you build exceptional applications.

Highlighted improvements in Qt 6.9 include:

  • Qt Graphs: Interactive 2D panning, zooming, and dynamic 3D graph injection. Printing support now available!
  • Qt Quick: GPU-accelerated SVG animations and Variable Rate Shading for improved graphics performance.
  • Qt Quick Controls: New context menu support enhances desktop integration and user experience.
  • XR Enhancements: Haptic feedback added for creating richter immersive virtual interactions.
13
2
submitted 1 year ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

With P2900, we propose to add contract assertions to the C++ language. This proposal is in the final stages of wording review before being included in the draft Standard for C++26. It has been suggested by some members of the C++ standard committee that this feature is too large, too complicated, and hard to teach. As it turns out, the opposite is true: contract assertions are actually very simple and can be explained in just five minutes. In this blog post, we will do exactly this!

As the name says, contract assertions are assertions — correctness checks that the programmer can add to their code to detect bugs at runtime. So they’re just like the existing assert macro, except they’re not macros (which fixes a bunch of problems) and they’re way more flexible and powerful!

14
1
Boost 1.87.0 released (www.boost.org)
submitted 1 year ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

Boost provides free peer-reviewed portable C++ source libraries that work well with the C++ Standard Library. Boost libraries are intended to be widely useful, and usable across a broad spectrum of applications. The Boost license encourages the use of Boost libraries for all users with minimal restrictions.

In Boost 1.87.0 a new library was added:

  • Parser: Framework for building parsers
15
1
submitted 1 year ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

KDE Frameworks are 72 addon libraries to Qt which provide a wide variety of commonly needed functionality in mature, peer reviewed and well tested libraries with friendly licensing terms. For an introduction see the KDE Frameworks release announcement.

16
1
submitted 1 year ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

In this paper, we propose a Contracts facility for C++ that has been carefully considered by SG21 with a high bar set for level of consensus. The proposal includes syntax for specifying three kinds of contract assertions: precondition assertions, postcondition assertions, and assertion statements. In addition, we specify four evaluation semantics for these assertions — one non- checking semantic, ignore, and three checking semantics, observe, enforce, and quick_enforce — as well as the ability to specify a user-defined handler for contract violations. The features proposed in this paper allow C++ users to leverage contract assertions in their ecosystems in numerous ways.

17
1
submitted 1 year ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

cross-posted from: https://lemmy.ml/post/22262821

This article compares two tools, Sanitizers and Valgrind, that find memory bugs in programs written in memory-unsafe languages. These two tools work in very different ways. Therefore, while Sanitizers (developed by Google engineers) presents several advantages over Valgrind, each has strengths and weaknesses. Note that the Sanitizers project has a plural name because the suite consists of several tools, which we will explore in this article.

18
1
submitted 1 year ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

In the Qt 6.7 release, we enabled support for C++20 comparison and also back-ported some of its features to C++17. This blog post will give you an overview of the comparison enhancements we are taking advantage of and offer guidance on implementing them in your custom classes.

19
1
submitted 1 year ago by gulia@mastodon.social to c/cpp@lemmy.ml

Hi there! Thanks everyone who could join us on the previous talk on parsing C++.

I’m happy to announce a new talk!

In this talk on the С++ semantics, we will take a look at symbols and name resolution. We will discuss different kinds of lookups, scope importing, overload resolution, as well as templates and their specifics.

Date: November 06, 2024, 12:00 PM UTC+1

I invite all C++ enthusiasts to join! - https://pvs-studio.com/en/webinar/

@cpp @cppguide @programming_discussions @cplusplus @cplusplus@allforall.network

20
1
Why Safety Profiles Failed (www.circle-lang.org)
submitted 1 year ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

Safety Profiles were introduced in 2015 with the promise to detect all lifetime safety defects in existing C++ code. It was a bold claim. But after a decade of effort, Profiles failed to produce a specification, reliable implementation or any tangible benefit for C++ safety. The cause of this failure involves a number of mistaken premises at the core of its design:

  1. “Zero annotation is required by default, because existing C++ source code already contains sufficient information”
  2. “We should not require a safe function annotation”
  3. “Do not add a feature that requires viral annotation”
  4. “Do not add a feature that requires heavy annotation”

The parameters of the problem make success impossible. This paper examines the contradictions in these premises, explains why the design didn’t improve safety in the past and why it won’t improve safety in the future.

21
1
submitted 1 year ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

Does the C++ design follow the zero-overhead principle? Should it? I think it should, even if that principle isn’t trivial to define precisely. Some of you (for some definition of “you”) seem not to. We– WG21 as an organization – haven’t taken it seriously enough to make it a requirement for acceptance of new features. I think that is a serious problem, but one that we (WG21) should be able to handle. This paper offers some examples.

22
1
submitted 1 year ago* (last edited 1 year ago) by bunitor@lemmy.eco.br to c/cpp@lemmy.ml

i've been playing with cppfront for a few minutes now and it's been a surprisingly pleasant experience so far. i'm tempted to try it out at work to see what happens, but i wanna know if anyone tried to use it in production and what your experiences are

for those who haven't heard of it, cppfront is a cpp2 to c++ compiler, a bit like coffeescript for js. cpp2 is herb sutter's proposal of a new and cleaner c++ syntax with better ergonomics, better orthogonality, and better defaults

23
1
submitted 1 year ago by gulia@mastodon.social to c/cpp@lemmy.ml

PVS-Studio on CppCast: Exploring the World of C++ Parsing and Analysis

Yuri Minaev, the C++ static analyzer architect at PVS-Studio, joins CppCast to talk about static analysis and how PVS-Studio helps develop software.

https://pvs-studio.com/en/blog/video/11127/?utm%5C_source=website&utm%5C_medium=mastodon&utm%5C_campaign=podcast&utm%5C_content=ccpcast

@cpp

24
1
New C++ features in GCC 14 (developers.redhat.com)
submitted 2 years ago by JRepin@lemmy.ml to c/cpp@lemmy.ml

cross-posted from: https://lemmy.ml/post/15682818

The next major version of the GNU Compiler Collection (GCC), 14.1, was released on May 7 2024. Like every major GCC release, this version brings many additions, improvements, bug fixes, and new features.

25
1
submitted 2 years ago by ylai@lemmy.ml to c/cpp@lemmy.ml
view more: next ›

C & C++

1049 readers
1 users here now

founded 6 years ago
MODERATORS