News for hackers. Stuff that matters.
Re:CppCon 2022 by pjmlp on Saturday September 17, 2022 @05:03AM (#32875990)
Bjarne's keynote is quite interesting, he is yet again trying to educate the community to move beyond coding C in C++, and help improve, embrace, modern tooling.
Re:CppCon 2022 by yakubin on Saturday September 17, 2022 @06:03AM (#32876256)
Do you mean "C++ in Constrained Environments"? Honestly, to me it feels very abstract and hand-wavy, lacking demonstration of a real-world problem being solved. It also looks like the same talk Stroustrup's been giving for the last several years, with maybe minor tweaks.

To me talks by practitioners, who have experience in a given field allowing them to know what works and what doesn't, are more compelling. In the past Mike Acton and Chandler Carruth were such speakers. After quickly going over the schedule, this year Ben Saks, Andrew Drakeford, Ivica Bogosavljevic, Eyal Zedaka, Daniel Withopf, Andreas Weis and Ilya Burylov seem to be such speakers. I'll watch their talks when they become available.

Re:CppCon 2022 by pjmlp on Saturday September 17, 2022 @06:15AM (#32876316)
Yes it is the same talk, because too many keep writing C in C++, that is unavoidable when the language are 90% compatible at copy-paste level, people are stuck on their own ways without reason to upgrade themselves, and too many students still learn C++ the way it was taught pre-C++98.

Many of those practitioners, do indeed do great talks, but they also live in a bubble far away from 9-5 C++ coders that put out most code.

I advise a CppOnSea 2022 talk, "help me my team is stuck in 90's".

Re:CppCon 2022 by nocman on Saturday September 17, 2022 @12:56PM (#32879025)
> ... because too many keep writing C in C++

I am sure for many of those people, they do this because they have decided that sufficiently understanding the complexities of C++ provides too little payout (or in some cases none at all) to make the shift worthwhile for them. I don't think accusing developers of "being stuck in the 90's" is the right way to convince them to work differently. If the technology is actually better, you should convince them of such by demonstrating it with many concrete examples.

Contrary to what many seem to believe, just because something is new doesn't mean it is better, even when computers are involved.

Re:CppCon 2022 by belter on Saturday September 17, 2022 @08:37AM (#32877040)
"Help, My Team Is Stuck In The 90s - Dave Winterbottom - C++ on Sea 2022" - https://youtu.be/M1xFJedN-6Q
Re:CppCon 2022 by google234123 on Saturday September 17, 2022 @06:42AM (#32876432)
Maybe it’s time to stop blaming devs and instead blame the language?
Re:CppCon 2022 by arinlen on Saturday September 17, 2022 @06:57AM (#32876481)
> Maybe it’s time to stop blaming devs and instead blame the language?

Ah, blaming the tools: the Hallmark of a master.

Take a moment to think about the problem. You're in a multi-team project, with a few millions lines of code. You're paid to deliver results and meet the client's requirements, and you're already behind schedule. Suddenly the C++ standard committee releases a new C++ standard. What are you going to do? Are you going to

a) continue working on your tickets, or

b) are you going to drop everything to spend weeks updating tooling, projects, dependencies, and put up a series of workshops with the purpose of getting everyone onboard the new shiny toy?

And did you noticed that option b) adds absolutely no value at all?

It's great that you can flip a flag and turn your hello world project into a C++20 project with no work at all, but real world teams that are in the business of outputting real world production-ready code requires a bit more caution.

For instance, I still recall from a previous project I worked with how a n upgrade to C++14 led a dependency to over-eagerly jump head-on to constexpr which caused weird and non-trivial linking errors that took a week or so to sort out. And constexpr wasn't a new addition in C++14.

Re:CppCon 2022 by tux3 on Saturday September 17, 2022 @07:49AM (#32876744)
Upgrading to C++14 - a minor release compared to C++11 and C++17 - caused a weeksworth of weird, nontrivial linking errors.

Do you think that's an unavoidable law, or is it something accidental that could have gone better?

Would you say a similar minor upgrade of the language version in other languages would have also caused a week of similar hard to debug errors, for a project of the same size?

I'm curious who you blame, if you don't blame the tools. You could try to blame people. Or one might say it's just how things are and we can't do better.

I'm just not sure if you see this as unavoidable, or if it's something else that makes you say that? You got me curious.

Re:CppCon 2022 by arinlen on Saturday September 17, 2022 @08:24AM (#32876956)
> Do you think that's an unavoidable law, or is it something accidental that could have gone better?

It was the result of having to develop production code in the real world, reusing real world production code developed by third-parties.

In my particular case it just so happened that the upstream dependency exported interface headers that conditionally defined stuff with C++14 features in spite of what shipped with their binaries. Stuff using constexpr ultimately resulted in tons of hard to track linking errors.

> Would you say a similar minor upgrade of the language version in other languages would have also caused a week of similar hard to debug errors, for a project of the same size?

This was not a C++ problem. This was a problem caused by the way this particular project was designed to toggle C++14 features when they should not be toggled.

Just because problems emerge when updating a project to the next language version, that does not mean the language is held to blame.

This is one of the reasons why I firmly believe half the people in this thread talking crap about software updates and bumping programming language versions are quite frankly talking about stuff they know nothing about and have zero real world experience. There's far more stuff going on in a language upgrade than flipping a switch and rebuilding a project, specially if upstream dependencies made some less-than-advisable decisions on how to release their work.

Re:CppCon 2022 by tcoff91 on Saturday September 17, 2022 @10:12AM (#32877664)
So you were linking against prebuilt libraries, and you had third party headers for those libraries that were doing some constexpr stuff that was breaking linking because the prebuilts no longer matched the headers?

In C++ if you aren’t able to build your entire stack of dependencies from source you are gonna have a bad time like this at some point. Any prebuilt libraries you depend on better be pure C, headers included.

Re:CppCon 2022 by tux3 on Saturday September 17, 2022 @08:34AM (#32877022)
Thanks, appreciate the perspective
Re:CppCon 2022 by plorkyeran on Saturday September 17, 2022 @03:32PM (#32880669)
My experience with migrating real-world projects incrementally from C++98 -> C++20 has been that it is typically closer to a day of work to get everything working with the new standard, and that the benefits have been enormous. `if constexpr` is a particularly standout example of something which has turned things which would have been a week's worth from a C++ expert into something doable in an hour by a junior developer.
Re:CppCon 2022 by wheelerof4te on Saturday September 17, 2022 @06:57AM (#32876478)
Absolutely.

I am not surprised by this lack of understanding of human psychology. People will always do the most simple, natural thing that they learned at some point in their lives. You can't expect them to change overnight or even change at all.

A lot of folks who write C in C++ are old gurus who learned their trade long ago.

Re:CppCon 2022 by UncleMeat on Saturday September 17, 2022 @08:06AM (#32876851)
It sadly isn't fixable a the language level because of backwards compatibility priorities. It'll always be the case that you can write C in C++.
Re:CppCon 2022 by pjmlp on Saturday September 17, 2022 @07:19AM (#32876583)
Both are to blame.
Re:CppCon 2022 by tialaramex on Saturday September 17, 2022 @08:46AM (#32877092)
In the Q&As at the end Stroustrup does give us yet another version of the "We can just do that in C++" safety claim -- https://youtu.be/2BuJjaGuInI?t=4749

"I think that the approach I'm talking about with static analysis and rule based... for modern styles can deliver complete safety"

I expect over the next decade or so, a lot more resources will be thrown at unsuccessful attempts to solve this problem.

Re:CppCon 2022 by DSingularity on Saturday September 17, 2022 @09:33AM (#32877411)
Is a theoretically hard problem. Idk why these statements keep getting made.

Maybe I am misunderstanding? Don’t you have to solve inter-procedural pointer aliasing first?

Re:CppCon 2022 by GuB-42 on Saturday September 17, 2022 @11:27AM (#32878287)
I think coding C in C++ in underrated.

C++ has tons of features, many will say "too many", and it accumulates over every revision. C, by comparison, is simple.

But sometimes C is too simple, it is fine for 99% of your needs, but for the extra 1%, you need C++. If that's the case, just write C and compile it with a C++ compiler so you can take that extra feature you need. Just because you are using a modern C++ compiler doesn't mean you should start using RAII, managed pointers, exceptions, and all these things.

Sometimes it makes sense to go full-on "modern C++", but using C++ literally as "C incremented by one" is a use case that shouldn't be dismissed.

Re:CppCon 2022 by oriolid on Saturday September 17, 2022 @11:44AM (#32878425)
Just asking because I'm curious: What are the parts of C++ that you actually use? To me RAII and managed pointers are by far the most useful features in C++, followed by templates (think of them as type safe macros with slightly less horrible syntax, not as generics).
Re:CppCon 2022 by rsaxvc on Saturday September 17, 2022 @12:23PM (#32878747)
Not the commenter but embedded embedded here so my perspective is a little different.

For me, constexpr for resolving complex build-time logic into constants, cleaner type handling for the math library makes it harder to accidentally pull in a 64-bit libm when we only have a 32- it FPU, and templating for sure.

It's pretty easy in C to reach a point where macros of macros is madness but templates calling templates still works with the debugger and is a powerful mechanism for hoisting complexity out of loops. Also works nicely for writing outer loops once in c++ calling a template specialized to either inline assembly or c++.

Managed pointers sometimes but our team seems pretty good with object lifetimes from a C background, and we don't use too much heap anyway.

RTTI and exceptions we often disable to save code space.

RAII is a little tricky without exceptions, we often use it's easy.

Re:CppCon 2022 by oriolid on Sunday September 18, 2022 @05:24PM (#32891631)
Good point about embedded, smart pointers aren't that great when you try to avoid allocating memory at runtime and never free it anyway. RAII is still useful for managing other lifetimes, though. The last time I worked on embedded stuff the compiler we used generated often larger code for constexpr, so we didn't really use it.
Re:CppCon 2022 by intelVISA on Saturday September 17, 2022 @01:50PM (#32879575)
About the same here: RAII > smart pointers > constexpr > templates > coro in that order.
Re:CppCon 2022 by 5636553454654 on Saturday September 17, 2022 @07:14PM (#32882567)
This is similar to me. As far as modern stuff, I'm willing go upto c++20, and I use smart pointers, templates, constexpr, RAII, and STL.

With templates, I use them for generics, but also judiciously to create meta-linguistic abstractions to get around certain limitations of language. For example, I built an ORM using them.

I don't use auto, or lambdas, or even foreach (I use iterators), despite oddly having much more dynamic language experience.

Re:CppCon 2022 by mrits on Saturday September 17, 2022 @11:54AM (#32878512)
C is simple in a similar way that performing surgery is. Scalpel and whiskey can go a long ways if the training is accurate. A bad surgeon could also be overwhelmed by the amount of modern tools and use the wrong one. But a surgeon up to date on best practices and the wisdom of knowing what the instruments designed for is most likely going to have a higher survival rate.
Re:CppCon 2022 by phao on Saturday September 17, 2022 @03:20PM (#32880529)
This, I believe, touches upon the accidental versus essential complexity theme.

I believe people, in general, agree C is too simple of a programming language to actually deal with all the essential complexity of modern software development in various cases.

The actual complaint people have about C++ is that it has too much extra unnecessary accidental complexity due to weird ways features interact.

The analogy of the Surgeon I believe should be adjusted having these two points in mind. Generally speaking, surgeons would agree that "scalpel and whiskey" are too simple of a tool set for doing modern surgery. However, if you take modern surgeon tools and add a bunch of weirdness to them, then surgeons would reject them on the grounds of being more complicated than needed.

> A bad surgeon could also be overwhelmed by the amount of modern tools and use the wrong one.

When this is contrasted with the C++ situation, I believe the comparison would be fair only if all the modern features in C++ had to do with the inherent essential complexity of software development. That is not the case (at all). Expert developers have been talking about how C++ is unnecessarily complicated for ages (before C++03 even; back when things were simpler in terms of weird language feature interactions).

Re:CppCon 2022 by interroboink on Saturday September 17, 2022 @05:46PM (#32881912)
> doesn't mean you should start using RAII

I agree with your overall point, but I feel like RAII is practically the key feature that C++ provides over C (:

Or at any rate, I wouldn't say it is anything to do with "modern C++". It was there from the beginning, and C++'s object lifetime rules are pretty core to the language IMO.

I'm curious, since you phrased it that way: what C++ feature(s) do you tend to reach for first, when moving from C to C++?

Re:CppCon 2022 by Keyframe on Saturday September 17, 2022 @01:38PM (#32879433)
Right, a lot of people do that. One shouldn't keep out of mind though that C isn't really a subset of C++. There are more than a few differences.
Re:CppCon 2022 by kouteiheika on Saturday September 17, 2022 @06:47AM (#32876451)
It's also interesting that Bjarne thinks that we can get full Rust-like memory safety through static analyzers for C++: https://youtu.be/2BuJjaGuInI?t=5000

But so far I haven't seen any convincing evidence that would prove (or give a high degree of confidence) that it can be done. It this just wishful thinking on Bjarne's part, or is there somewhere I could read on how he thinks that could actually be done in practice?

Re:CppCon 2022 by belter on Saturday September 17, 2022 @08:44AM (#32877083)
Bjarne Stroustrup on C++ large compilation times... "I really like Scala because makes C++ look fast" :-)) - https://youtu.be/2BuJjaGuInI?t=5070
Re:CppCon 2022 by pjmlp on Saturday September 17, 2022 @07:18AM (#32876578)
I think in a ideal world it would be possible, but people won't stop writing C in C++, and that makes static analysis quite hard.

Visual C++ support for it is pretty much WIP, full of false positives.

Re:CppCon 2022 by chrsig on Saturday September 17, 2022 @08:16AM (#32876893)
Would someone mind giving a description of "writing C in C++"?

It seems a bit off to me to claim it's a superset of C while banning the subset of C.

Like it or not, C++ does have things like raw pointers, null terminated arrays, setjmp/longjmp, and macros. That's part of being a superset of C. Using them in C++ is still C++ if it's compiled by a C++ compiler.

It may not be idiomatic, but I'd love to see the C++ community come up with a single definition for idiomatic C++. And to preempt the answer of "idiomatic C++ is Modern C++" -- How about things like exceptions, rtti, and iostream?

Re:CppCon 2022 by arinlen on Saturday September 17, 2022 @09:03AM (#32877192)
> Would someone mind giving a description of "writing C in C++"?

For starters, write non-idiomatic code which employs (exclusively or not) a subset of features.

Imagine writing Python and only using free functions, while vehemently refusing to use stuff like classes or list comprehension or exceptions or anything at all. Similar to "writing C in C++", this would be "writing shell scripts in Python".

> Like it or not, C++ does have things like raw pointers, null terminated arrays, setjmp/longjmp, and macros. That's part of being a superset of C. Using them in C++ is still C++ if it's compiled by a C++ compiler.

You're missing the whole point.

"Writing C in C++" is synonymous to "not using new C++ features that are safer and faster and better than the old C features".

It's completely irrelevant if the compiler supports raw pointers or preprocessor macros. The whole point is that, say, intentionally using raw pointers when you have smart pointers is hardly justifiable, and you're not doing yourself any favor.

Re:CppCon 2022 by wheelerof4te on Saturday September 17, 2022 @02:39PM (#32880074)
I can understand if people want to avoid using classes. But list/dict/set comprehensions make building complex data structures easier and more performant.

Usually, if one avoids OOP features of Python, that means he/she likes to use more functional features. And vice-versa.

I imagine it's the same with C vs C++. People use malloc/free, classic for loops and structs+functions only because that style fits their mindset better.

Re:CppCon 2022 by pjmlp on Saturday September 17, 2022 @08:29AM (#32876989)
Bjarne even gave an example at the talk with span versus pointer and length as argument.

Writing C in C++ means exactly that, writing C++ code in the subset that is also valid C, while ignoring everything else that the language offers regarding type safety, including basic stuff like RAII, or templates instead of macros.

Technically it is C++ code, in practice can be compiled with a C compiler as well.

Re:CppCon 2022 by q-big on Saturday September 17, 2022 @09:18AM (#32877311)
> It seems a bit off to me to claim it's a superset of C while banning the subset of C.

C++ is not a superset of C.

Re:CppCon 2022 by chrsig on Saturday September 17, 2022 @09:21AM (#32877329)
Unfortunately, I'm very well aware
Re:CppCon 2022 by bregma on Saturday September 17, 2022 @07:33AM (#32876649)
Rust's advantage is that it performs static analysis at compile time. The only reason to believe that identical static analysis can not be done without the magic of Rust is religious fervour.
Re:CppCon 2022 by the_duke on Saturday September 17, 2022 @12:23PM (#32878746)
Rusts advantage is that is has made language level design tradeoffs to achieve semantics that allow for this kind of static analysis.

And they only just barely managed to get something usable in the beginning. Rust ergonomics have improved a lot since 1.0.

The criticism here is that C(++) advocates often claim the language is fine, and static analysis is enough to fix the problems.

Rust is hopefully just a stepping stone to something better, but the assumption that no new language semantics are needed is denial.

Re:CppCon 2022 by UncleMeat on Saturday September 17, 2022 @09:25AM (#32877362)
All static analysis is performed without executing the program. That's the definition. Whether an analyzer is runs before codegen or after is not an incredibly meaningful distinction since both can be integrated for developer environments in precisely the same way.
Re:CppCon 2022 by c-cube on Saturday September 17, 2022 @08:48AM (#32877100)
The magic of rust is that it forces all code to go through this static analysis to even compile. You can't avoid it. Even `unsafe` goes through it but with some additional freedom. The language is designed around static analysis, for example there's syntax for lifetimes and mutable/immutable references with their lifetime.

I see no evidence that C++ (or any language) can provide the same level of confidence, without having the same sort of support in the language itself. An analysable fragment of C++ might be a thing; rust level guarantees for the whole language is very unlikely.

Re:CppCon 2022 by bregma on Sunday September 18, 2022 @06:32AM (#32886258)
That the language does not force you to use static analysis does not entail that it is not possible.

Where I work, most C code can not be checked in to source control until the CI bot is satisfied with the static analysis run. That's necessary because of C's separate compilation model: static anaylsis requires whole-program analysis to track aliasing.

Rust is a single tool that does (or may do, when opted-in) static analysis. It's not the first, not the only, and probably not the best. Other development environments use separate tools for separate operations. Engineering has always had its lumpers and dividers. Rust and Windows is for lumpers, C and Unix is for dividers.

Re:CppCon 2022 by gpderetta on Saturday September 17, 2022 @09:23AM (#32877346)
The proposed c++ static lifetime analysis does indeed require language kevel annotations.
Re:CppCon 2022 by Quekid5 on Saturday September 17, 2022 @06:56AM (#32876473)
IIRC the Chromium devs have investigated and thought a lot about this and the TL;DR is: They don't believe it can be done.

(I'd be inclined to take their word on it over Bjarne's.)

I'm not sure this is where I originally read their conclusions, but lots of info about this, regardless: https://docs.google.com/document/d/e/2PACX-1vRZr-HJcYmf2Y76D...

Re:CppCon 2022 by arinlen on Saturday September 17, 2022 @07:07AM (#32876527)
> IIRC the Chromium devs (...)

Chromium is hardly a compiler or tooling project. Even if their devs aren't hacks, appeals to authority based on their perceived expertise hardly make any sense.

Having said that, there is no better litmus test than showing something working. If Dr Stroudtrup strongly believes in C++'s ability to provide Rust-like memory safety guarantees, there's no better person than him to prove him right (or wrong). If he does not have a proof of concept in the works, he's not in a good position to substantiate his claim.

Re:CppCon 2022 by cma on Saturday September 17, 2022 @01:11PM (#32879163)
FWIW, Chromium contains a Javascript compiler and developer tooling.
Re:CppCon 2022 by Quekid5 on Saturday September 17, 2022 @07:32AM (#32876642)
I'm not saying it's proof or anything. It is evidence that it's likely to be very hard (if not impossible).
Re:CppCon 2022 by arinlen on Saturday September 17, 2022 @08:12AM (#32876874)
> It is evidence that it's likely to be very hard

I don't agree. Chromium is an end-user of compilers and tooling that originated in forking a third-party desktop app. Developing C++ compilers and static code analyzers is way way outside of their wheelhouse. What they can and cannot do outside of their wheelhouse is hardly relevant or representative.

Re:CppCon 2022 by lgg on Saturday September 17, 2022 @11:36AM (#32878356)
I think you under estimate just what level expertise and pull modern web engine requires. Google funded a ton of the work to support clang building code for Windows explicitly so they could standardize on clang for Chromium on all platforms. In turn they used the fact that they use a single toolchain across all platforms to add support for things like control flow integrity, which involved low level ABI and runtime changes to to the compiler and libc++. That requires tight cooperation between the Chromium and the compiler teams, and is definitely beyond a typical "end-user of compilers and tooling."

Admittedly my claims about Chromium are based on my observations as an outsider, but as someone who works on tooling (linkers) at a different large company that also has a web engine written in C++ I can tell you it is consistent with what I have seen up close... web engines (and particular JavaScript JITs) tend to push C++ tooling hard and often inspire major investment by the teams working on C++ specifically to support them.

In fact, over the years I have seen a number of people (including C++ committee members) who transitioned back and forth between the C++ compiler teams and the JavaScript JIT teams because they sometimes work very closely together, so in my experience the level C++ expertise on lot of the teams developing web engines tends to exceed anything but the actual C++ tooling teams supporting them, and developing C++ tooling is most certainly in their wheelhouse.

Re:CppCon 2022 by netr0ute on Saturday September 17, 2022 @10:43AM (#32877916)
We didn't go to the moon because it was easy, we went to the moon because it was hard.
Re:CppCon 2022 by nly on Saturday September 17, 2022 @08:22AM (#32876940)
It can probably be done if you restrict some of the language features. e.g. reinterpret_cast, unprovable static_casts uninitialized pointers, etc etc.
Re:CppCon 2022 by tlb on Saturday September 17, 2022 @07:40AM (#32876687)
Statically provable memory safety is probably possible in some sorts of code, like business process logic where performance isn't critical, and you can use std:: containers and copy everything.

A browser is a much more demanding environment, involving code generation, multithreading, caching, and low-overhead interfaces to complex data structures. Memory safety is extremely hard in that case.

So both could be true.

Re:CppCon 2022 by kaba0 on Saturday September 17, 2022 @07:29AM (#32876628)
For correctness’s sake let’s add that the problem domain of Chromium doesn’t allow for only-safe Rust. Recursive life cycles are not enough here, and for performance reasons (A)RC is neither.
Re:CppCon 2022 by chubot on Saturday September 17, 2022 @11:37AM (#32878367)
Why should I code in C++ idioms if it has significant downsides?

An example is I wrote a varadic template for a GC allocation interface:

    T1* obj1 = Alloc<T1>(arg1)
    T2* obj2 = Alloc<T2>(arg2, arg3)
However because I have so many fine-grained types, this seems to takes up 10% of the VM size of the program!

https://www.oilshell.org/release/0.12.5/pub/metrics.wwz/oil-...

The total vmsize is 1217792 and the 2 Alloc<> entries are about 10% of that.

So my conclusion is that it would have been better to use a macro all along, which would look something like:

    T1* obj1 = ALLOC(T1, arg1)
    T2* obj2 = ALLOC(T2, arg2, arg3)
This will expand to something like:

    T1* obj1 = new (gHeap.Allocate(sizeof(T1)) (arg1)
That is, it uses placement new to constructs the object inside a GC'd heap.

-----

I don't believe the C++ idiom is any faster, and it makes the code larger (and potentially slower).

Am I missing something?

I think the issue is that the monomorphization happens for each T and not for each sizeof(T), and even doing it on sizeof(T) is not really necessary for fast code.

Oil has more fine-grained and ML-style strong types than any other shell implementation, via ASDL and C++. So I try to take advantage of additional type safety. But sometimes it's not worth it. I suspect the macro is better here. It will be somewhat annoying to change all the code, but probably worth it.

Re:CppCon 2022 by krona on Saturday September 17, 2022 @11:56AM (#32878533)
Break up Alloc<T> in to templated and (mostly) non-templated parts? Without seeing the code its hard to know.
Re:CppCon 2022 by chubot on Saturday September 17, 2022 @12:24PM (#32878752)
It is a tiny function that is basically equivalent to that macro, but using variadic templates:

    template <typename T, typename... Args>
    T* Alloc(Args&&... args) {
      assert(gHeap.is_initialized_);
      void* place = gHeap.Allocate(sizeof(T));
      assert(place != nullptr);
      // placement new
      return new (place) T(std::forward<Args>(args)...);
    }
https://github.com/oilshell/oil/blob/master/mycpp/gc_heap.h#...

So there is nothing to really break up

Re:CppCon 2022 by cma on Saturday September 17, 2022 @01:12PM (#32879171)
Make it forced-inline and it should be more similar to the macro.
Re:CppCon 2022 by jcelerier on Saturday September 17, 2022 @06:25PM (#32882210)
It also needs to be marked as hidden or internal visibility (or be made static) otherwise an instantiation will likely still be present in the binary
Re:CppCon 2022 by an_d_rew on Saturday September 17, 2022 @07:15PM (#32882580)
A point that I rarely see raised is that in mission critical or safety critical applications, exceptions and implicit heap allocations are, with good reason, explicitly banned.

So no standard library for you.

Which likely implies "no C++".

Which keeps us writing in C.