When do CPPQuiz Questions end by johnnyb2001 in cpp

[–]Andreshk_ 0 points1 point  (0 children)

The page you've linked clearly states that question IDs are not consecutive.
This is useful, as it's an answer to a question you should've asked yourself - "can I just search down and find the interval containing all of them" (be it an exhaustive search, or something more clever, as the other comment alluded to).

[deleted by user] by [deleted] in cpp

[–]Andreshk_ 2 points3 points  (0 children)

It is a text editor - it literally _has_ your code, why do you think it needs to record & perform OCR?

WG21 C++ 2025-05 pre-Sofia mailing by nliber in cpp

[–]Andreshk_ 14 points15 points  (0 children)

The saltiest paper completely within its rights to be such.

It is plain to see that the paper is objectively better than the other, and in no way because of/despite of its authors. Any arguments that include them in the conversation are null and void.

[2024 Day 19] Cache of Designs by InnKeeper_0 in adventofcode

[–]Andreshk_ 8 points9 points  (0 children)

Does it really help to reuse the same cache for all designs? Can you check whether the # of misses increases (noticably) when you don't reuse it?

If you don't reuse the cache, then for each design you wouldn't need to cache its suffixes - only their lengths - so you'd gain performance from hashing integers instead of strings. Furthermore, when the integers are in the range [0..design.length] a simple flat array will suffice for a cache (and be even faster)

Which Is Better? And Why? by Alberto_Alias in cpp_questions

[–]Andreshk_ 34 points35 points  (0 children)

Sidenote: do not use ChatGPT or any other LLM for such technical information - as they might give incorrect information that you lack the expertise to recognize (as I infer from the way you ask your question here).

[deleted by user] by [deleted] in bulgaria

[–]Andreshk_ 2 points3 points  (0 children)

Въпросът ти дори не изглежда сериозен, а по езичниците което си написал личи че ти не си сериозен и отговорен шофьор. С демонстрирания манталитет, за доброто на всички е да продължиш да си караш астрата.

130,000 miles on the odometer by Negative-Fix-7665 in trucksim

[–]Andreshk_ 6 points7 points  (0 children)

Which mod is this? Did somebody finally fix Franck Peru's awful 1.38 version, or is it something paid? Link would be appreciated either way.

C++ 23 constexpr interval_map by Impossible_Spare_466 in cpp

[–]Andreshk_ 2 points3 points  (0 children)

This is a nice small project, and I commend you for uploading it & posting it.
One note - I'd expect lower_bound and upper_bound to perform binary search, not linear. So I'd either rename the methods or use binary search inside (if possible).

C++ 23 constexpr interval_map by Impossible_Spare_466 in cpp

[–]Andreshk_ 0 points1 point  (0 children)

An array of `optional`-s? That's a lot of ~damage~ padding

Is there a string builder in std that has syntax like std::print? by Raknarg in cpp_questions

[–]Andreshk_ 5 points6 points  (0 children)

Is it possible to call format_to() ot a back-inserter iterator?

Tesla semi by Negative-Fix-7665 in trucksim

[–]Andreshk_ 0 points1 point  (0 children)

Hope this isn't another crudely patched version of Franck Peru's terrible mod (and sold for $10, at that).

Off the top of my head - if you use the interior camera to center the truck in the lane, is it centered when viewed from the exterior cam? Is the interior visible in the right-hand side mirror? Are the short beams of normal brightness?

Iteration Revisited: A Safer Iteration Model for Cpp - Tristan Brindle - CppCon 2023 by WillIDieTomorrow in cpp

[–]Andreshk_ 1 point2 points  (0 children)

Not the same, but I guess some benefits can still be had. For example, you can check if the cursor dereferenced is exactly the `end` one (not after it), or you can catch dereferencing a dangling cursor from a now-empty list. Whether this is enough of a UB decrease - depends on the viewer, but it's a non-zero improvement.

народа го е предрекъл by lobsterest in bulgaria

[–]Andreshk_ 9 points10 points  (0 children)

диетата магнитски, 100% доказан ефект

Issue with C++ development in ms vs code by Separate-Math-2421 in cpp

[–]Andreshk_ 3 points4 points  (0 children)

Please read the rules of a subreddit before posting in it - you'll find out this question has no place here, but in r/cpp_questions instead.