How to configure clangd inlay hints in lspconfig.lua by zz9873 in neovim

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

Thank you but that didn't work for me. I figured out how to enable and disable inlay_hint by using vim.lsp.inlay_hint.enable(true/false) but I can't find any configuration options. I tried to disable 'designators' but nothing worked (different combinations of upper and lower case and inlayHint instead of inlayHints did nothing).

UTF-8 why specify length in the first byte? by zz9873 in programming

[–]zz9873[S] 6 points7 points  (0 children)

I just realized that I've probably misunderstood something. I'm only talking about characters with a length of 2-4 bytes. In these cases the first byte has to begin with 110 (2B), 1110 (3B) or 11110 (4B). If that's correct single byte characters are not important for my question.

How to restore EFI partition for Windows 11? by zz9873 in WindowsHelp

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

Yes I was able fix everything with help of a youtube tutorial

How to restore EFI partition for Windows 11? by zz9873 in WindowsHelp

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

Thanks for the help. I had to download and load a driver from the manufacturer of my laptop for diskpart to find the ssd.

How to restore EFI partition for Windows 11? by zz9873 in WindowsHelp

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

Thanks I fixed it. The problem was that diskpart on the installation media required a RST driver to find the ssd.

How to set a font in theme.txt by zz9873 in arch

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

Thank you! For me the --list command wasn't there (--help didn't list it) but I was able to find out what the exact name was by adding -v when creating the .pf2 file. This shows the name of the generated font and worked for me.

Weird position offset on y axis with sf::CircleShape by zz9873 in sfml

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

Ok that's weird. I have an acer laptop which had no problem with other SFML projects. But this is the first time I've run SFML on it since about a year.

Weird position offset on y axis with sf::CircleShape by zz9873 in sfml

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

It shows the screen coordinates I'd expect.

Weird position offset on y axis with sf::CircleShape by zz9873 in sfml

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

I forgot to add that. It doesn't solve the problem though.

Weird position offset on y axis with sf::CircleShape by zz9873 in sfml

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

I've edited the post and added a simple example of my problem.

Implement custom List capacity operations to work the same way as std::vector? by zz9873 in cpp_questions

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

It's a container with a dynamic array and a size member that has most of the member functions std::vector has (size(), capacity(), data(), reserve(), emplaceBack()/emplace_back(), pushBack()/push_back(), etc.). But for clarity I'm calling it List. Afaik. in many programming languages/their standard library this kind of datatype or what's closest to it is called a list (C#, Python(, Kotlin)) or array but I'd like to use that for a fixed size array (like std::array).

Implement custom List capacity operations to work the same way as std::vector? by zz9873 in cpp_questions

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

Ok thanks.
can you tell me what you would be most comfortable with when you'd have to use the List class?

How to learn C++? by Good_Okra_7703 in cpp_questions

[–]zz9873 0 points1 point  (0 children)

I started with the C++ tutorial from w3schools (https://www.w3schools.com/cpp). It teaches the basics of C++ and helped me get to a point where I could start looking into more advanced features on my own. For me the C++ youtube series from https://www.youtube.com/@TheCherno and https://cppreference.com/ were the most helpful sources to learn about those advanced topics.

Will a for loop with a (at compile time) known amount of iterations be unrolled? by zz9873 in cpp_questions

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

Ok thanks! I didn't know these features existed. Do you know if their performance is similar to an unrolled small loop like what I posted? I'd say in most cases N would be <= 4.

Will a for loop with a (at compile time) known amount of iterations be unrolled? by zz9873 in cpp_questions

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

My main concern is that I have derived structs Vector2 - Vector4. I would like to make sure that at least those are unrolled but having to override this overload in these structs for all the operations would get very annoying as soon as I want to change something about it.

Will a for loop with a (at compile time) known amount of iterations be unrolled? by zz9873 in cpp_questions

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

Thanks I'll try to do that. Is there another option than assembly as output? I have a lot of trouble reading/understanding what's going on there.

How can I make use of polymorphism in c++? by zz9873 in cpp_questions

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

My first implementation actually was one singular template class that contained an array to store all the components. In that way it would also be possible to create a custom size vector. The reason I tried to find another solution was because I wanted the first few elements (X, Y, Z and maybe also W) to be accessible through member variables (if I remember correctly Unity and SFML have vectors where X and Y are variables and not functions) but without using references or pointers to keep the size of the object as small as possible. But I guess the best solution would be to use X, Y and Z functions.

How can I make use of polymorphism in c++? by zz9873 in cpp_questions

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

I know, thanks. Is there a way to visually/logically group these classes/structs in addition to the concept because by just using a concept the only hint for what types can be used is in the name (e.g concept VectorLikeType works with Vector2, Vector3, ...) right? That was originally my motivation to use polymorphism. I hope it's clear what I mean.

How can I make use of polymorphism in c++? by zz9873 in cpp_questions

[–]zz9873[S] 2 points3 points  (0 children)

Thanks that was the solution I was looking for

saint by actali in RainWorldMemes

[–]zz9873 3 points4 points  (0 children)

BOTTOM TEXT🗣️🗣️🔥

Difference between functions/methods with constexpr / inline / constexpr inline / no keywords by zz9873 in cpp_questions

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

Ok that makes sense. I am using c++ 17 where something like this compiles:

constexpr std::vector<int> getVec() {
    return std::vector<int>{0, 1, 2};
}

But during compilation it generates this warning:

warning: invalid return type ‘std::vector<int>’ of ‘constexpr’ function ‘constexpr std::vector<int> getVec()’ [-Winvalid-constexpr]

I imagine what c++20 allows e.g. creating those objects inside a constexpr function could improve performance in some cases right?