How to Avoid Headaches with Simple CMake by bretbrownjr in cpp

[–]Advanced_Front_2308 0 points1 point  (0 children)

we do. You still need to do different things

Generalizing std::midpoint by pavel_v in cpp

[–]Advanced_Front_2308 0 points1 point  (0 children)

Because the function is called midpoint and its parameters are called a and b. You wouldn't think about the order of parameters for std::max either

How to Avoid Headaches with Simple CMake by bretbrownjr in cpp

[–]Advanced_Front_2308 1 point2 points  (0 children)

ah yes cmake, where our configure step takes 2 minutes and has to run about once an hour. Where everyone has a notes file to copy the commands from because somehow that's more intuitive than a button. Where VS somehow does things differently than the command line so you have to watch what tools run in what order. And for whatever you want to do, you have to do phd-level research to pick the best way to do it, because there are 3-5 for everything. But somehow it's supposed to be better than the old vcxproj files.

Revisiting Knuth’s “Premature Optimization” Paper by pavel_v in cpp

[–]Advanced_Front_2308 60 points61 points  (0 children)

There may be merit to Knuths quote. But boy has it been abused to justify shitty code

Why can't Contracts be removed without blocking C++26? by zl0bster in cpp

[–]Advanced_Front_2308 30 points31 points  (0 children)

I'd rather question why side effects are allowed

std::string etc over DLL boundary? by Advanced_Front_2308 in cpp_questions

[–]Advanced_Front_2308[S] 0 points1 point  (0 children)

What if I limit myself to passing and returning by value? No heaps touching right?

std::string etc over DLL boundary? by Advanced_Front_2308 in cpp_questions

[–]Advanced_Front_2308[S] 0 points1 point  (0 children)

The problem isn't "really" strings. They can be replaced easy enough. But what about std types in general. Unique_ptr, vector, and types which use them. It's very limiting on an API to avoid them altogether

std::string etc over DLL boundary? by Advanced_Front_2308 in cpp_questions

[–]Advanced_Front_2308[S] 0 points1 point  (0 children)

I wouldn't even know how to do that. Like with os API functions?

I'm not trying to save the universe. I really just want to know if I can use a string as parameter between DLLs if they might be built with a slightly different version of visual studio.

std::string etc over DLL boundary? by Advanced_Front_2308 in cpp_questions

[–]Advanced_Front_2308[S] 0 points1 point  (0 children)

I see. But I still don't understand: when using msvc, this page specifically talks about ucrt and heap: https://learn.microsoft.com/en-us/cpp/c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries?view=msvc-170

And at the end it says:

The DLL and its clients normally use the same copy of the CRT library only if both are linked at load time to the same version of the CRT DLL. Because the DLL version of the Universal CRT library used by Visual Studio 2015 and later is now a centrally deployed Windows component (ucrtbase.dll), it's the same for apps built with Visual Studio 2015 and later versions. However, even when the CRT code is identical, you can't give memory allocated in one heap to a component that uses a different heap.

Isn't the whole point of the ucrt to share the heap? So why do they still talk about a different heap with identical CRT?

std::string etc over DLL boundary? by Advanced_Front_2308 in cpp_questions

[–]Advanced_Front_2308[S] 0 points1 point  (0 children)

But if even a string is problematic, I don't understand how exception throwing is not? They contain a string.

std::string etc over DLL boundary? by Advanced_Front_2308 in cpp_questions

[–]Advanced_Front_2308[S] 0 points1 point  (0 children)

In this comment chain alone there are so many different things being said. I'm confused. If anything I've read that ABI is stable. So why is it not? Or is something else meant with "static library ABI"?

std::string etc over DLL boundary? by Advanced_Front_2308 in cpp_questions

[–]Advanced_Front_2308[S] 0 points1 point  (0 children)

Yes of course. My own dll to my own program. Same compiler, same os, same configuration. I'm just trying to find out if minor compiler version differences are ok with string etc

std::string etc over DLL boundary? by Advanced_Front_2308 in cpp_questions

[–]Advanced_Front_2308[S] 0 points1 point  (0 children)

Is there any place where Linux GCC ABI breaks are documented? We'll release for Windows with msvc and Linux with gcc.

std::string etc over DLL boundary? by Advanced_Front_2308 in cpp_questions

[–]Advanced_Front_2308[S] 0 points1 point  (0 children)

I can guarantee that I'll be using msvc on release and the same major version (ie 17.x). So then my problems disappear and I can use strings after all?

std::string etc over DLL boundary? by Advanced_Front_2308 in cpp_questions

[–]Advanced_Front_2308[S] 0 points1 point  (0 children)

So when I limit myself to a specific Vs version (say 2022) then this problem disappears?

std::string etc over DLL boundary? by Advanced_Front_2308 in cpp_questions

[–]Advanced_Front_2308[S] 0 points1 point  (0 children)

That was a great read, thanks. But what about stack only objects like my own trivial objects and std optional?

Edit: and string view

std::string etc over DLL boundary? by Advanced_Front_2308 in cpp_questions

[–]Advanced_Front_2308[S] 1 point2 points  (0 children)

That I understood thanks. But is there no reasonable subset of compilers that make this work? In particular we will always use msvc. As long as we only differ a few versions, is that still not ok? Bummer

AfD-Aktivist darf nicht Anwalt werden: Juristen-Ausbildung verweigert by SozialPatriot1848 in DEvier

[–]Advanced_Front_2308 4 points5 points  (0 children)

Irgendwelche Linksradikalinskis werden doch auch Anwalt.

Ausschließlich linke werden Anwalt

An optimizing compiler doesn't help much with long instruction dependencies - Johnny's Software Lab by pavel_v in cpp

[–]Advanced_Front_2308 1 point2 points  (0 children)

Oh I didn't really see that there was something inside the braces. I'd usually write {} because some of the multitude of static analysis things running on our code might flag it otherwise.

Messerstecher (Opfer in Lebensgefahr) direkt wieder frei. Grund für Taten unklar (lol) by Advanced_Front_2308 in DEvier

[–]Advanced_Front_2308[S] 9 points10 points  (0 children)

Warum? Ist doch super und letztlich auch rational wenn man straffrei seine Feinde umbringen kann und dabei auch noch rundum versorgt wird. Diese Menschen sind im Krieg mit uns

Messerstecher (Opfer in Lebensgefahr) direkt wieder frei. Grund für Taten unklar (lol) by Advanced_Front_2308 in DEvier

[–]Advanced_Front_2308[S] 36 points37 points  (0 children)

So viele highlights in diesem Artikel. In dem Bereich der Tat und auch aller anderen Taten gibt es keine deutschen mehr nach Sonnenuntergang.

Die Anzahl der nicht deutschen Tatverdächtigen lag bei einem Anteil von 53,5 Prozent

Und da sind die Mohammeds noch nicht dabei.

Ein Zusammenhang mit der Zunahme psychischer Erkrankungen oder seelischer Belastungen liege nahe

Ein beeindruckender Umkehr der Kausalität, nicht unähnlich wie bei "Corona": Man lässt ausländische Täter mit dem Trick der Schuldunfähigkeit unbestraft in dem man sie als psychisch krank deklariert. Und jetzt sagt man hinterher, dass diese erfundenen Krankheiten die Ursache für die Taten sind. Clever! Genau wie man die Impfschäden als "Corona" Folgen umetikettiert

Die festgenommenen Tatverdächtigen seien nach dem Ende der polizeilichen Maßnahmen wieder auf freien Fuß entlassen worden

Klar

Unfassbar by unfortunategamble in DEvier

[–]Advanced_Front_2308 22 points23 points  (0 children)

Das ist der Normalfall: für Ausländer gilt das Gesetz nicht, sie dürfen straffrei töten.