D
Still, the whole topic of bit_casting is very confusing, but somehow its difficult to even grasp the prerequisites
Pavel
Still, the whole topic of bit_casting is very confusing, but somehow its difficult to even grasp the prerequisites
About placement new, why should it initialize with zeroes? Normal new won't do that as well in this example, since it performs default initialization, and for std::byte the default initialization doesn't do anything guaranteed with the value
Pavel
https://en.cppreference.com/w/cpp/language/default_initialization
D
Oh i see, thank you
D
Also, does implicit lifetime type mean that its constructor is going to be implicitly called at some point? I've already tried triggering the behavior with GCC but haven't got any constructor call. As getting info from the talk, i suspect that a compiler, once knowing which type i'm gonna use on allocated memory, will implicitly call ctor after the allocation
Aditya
Guys I have a raycasting code with me but in that code I can't move can anyone help me??
Rose
Guys I have a raycasting code with me but in that code I can't move can anyone help me??
These are ways you can improve the odds of someone wanting to help you. Be considerate when posting questions. • Use a search engine to check if anyone else had the same question as yours before asking. Stackoverflow is your friend. • Be straight to the point (do not ask to ask.) • Be specific, include as many details as you can. • Show what you've tried to solve the problem • We don't care if anything is "urgent" or "important" - wait patiently for someone to reply. • In addition, please check this site to learn how to ask questions in a public forum. It's good style to limit the amount of messages you send to a public forum; put effort into 1 message, rather than sending many of them, and edit messages to fix errors or to include more information.
Aditi
Hi
San
Wanna learn C Any recommendations
M
Hi
Дмитрий
Hi
Дмитрий
Can I overload a method in a derived class? I have a set(double a, double b, double c) method in the Piramida class. I want to overload this method in the derived Prav_Piramida class. The overloaded method in Prav_Piramida must accept two set arguments(double a, double b).
Дмитрий
Please help me
Pavel
Pavel
Please help me
More info about both (just in case) https://www.geeksforgeeks.org/function-overloading-vs-function-overriding-in-cpp/ https://stackoverflow.com/questions/16835897/overloading-base-class-method-in-derived-class
Anonymous
#ot
Rose
#ot
Offtopic discussions should be done in the C/C++ Offtopic group. Please take your discussion/questions there.
Nomid Íkorni-Sciurus
https://en.cppreference.com/w/cpp/language/constraints Ok, I changed my mind about C++ concepts are cool.
Nomid Íkorni-Sciurus
I absolutely love them
especially with constexpr being that flexible
Nomid Íkorni-Sciurus
It's been a while since I looked into C++ I come from another world completely (Java, C, JS, TS)
Nomid Íkorni-Sciurus
seeing these features implemented in C++20 is very interesting
Danya🔥
It seems like the reflection is going to make it to C++26
Nomid Íkorni-Sciurus
It seems like the reflection is going to make it to C++26
I'm not sure this would be useful for C++ to be honest it only makes sense when you have unknown types at runtime which is a design flaw - or a design strength - of weakly-typed languages based on prototypes or relying on a dynamic RT like C#
Nomid Íkorni-Sciurus
the one thing I wouldn't complain about is custom attributes like C# or something.
Nomid Íkorni-Sciurus
Danya🔥
It'd allow to nuke all the code generation tools
Nomid Íkorni-Sciurus
I agree
Ludovic 'Archivist'
It seems like the reflection is going to make it to C++26
That would be absolutely crazy, I would start cleaning up so many projects
Danya🔥
That would be absolutely crazy, I would start cleaning up so many projects
Well Bloomberg published their PoC clang implementation for this proposal: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2996r0.html, so I have my hopes high
Leovan
Is it possible to get size of type in run-time? Like sizeof(), but in run-time
elsahou
/get markdown
Rose
/get markdown
If you are posting a single line of code, then embed the code within a single backtick i.e. ` The backtick should be there before the beginning of the line of code and at the end of the line of code. Ex: `cout << "Hello";` If you are posting multiple lines of code, embed the entire source code within three backticks (at the beginning and at the end) on a line of their own. Ex: #include<iostream> int main(){      return 0; } ``` <- Three backticks here
Danya🔥
smth like RTTI?
To get the size of a type, you need to know it somehow. Since you need to so "sizeof" in run-time, you need to store it somewhere
Danya🔥
If I had to guess, you need some kind of serialization
Simple Sorcerer
hi all
Simple Sorcerer
I have a type conflict issue when using typedef. typedef uses in the library. is there anyway to make the use of these typdefs local only to the library ( *.h)?
Simple Sorcerer
I'm not counting on a solution because I can't imagine how to resolve two identical names. but I'm thinking of a suggestion on how to get around this or suggestions for a small change to the library code
Simple Sorcerer
it's in the libecc library I don't think the type change is in .h will be fine. because the library is cryptographic
Simple Sorcerer
real example code file.h ... typdef unsigned int size_t; ... main.c #include "file.h" ... #include <std...> // typedef long unsigned int size_t; ...
Simple Sorcerer
damn, I'm lucky they're not used in the code I'm using. but I'll leave the problem, I'd be interested in what can be done about it.
Learning
can't you re-typedef it to a different type?
Rose
User Roya has 1/2 warnings; be careful! Reason: no hello, read the rules
Rose
User Amisha has 1/2 warnings; be careful! Reason: ad
D
It seems like the reflection is going to make it to C++26
Oh cpp already has it https://youtu.be/UlNUNxLtBI0?si=SieO8-UZ40ULpjKX
Danya🔥
Oh cpp already has it https://youtu.be/UlNUNxLtBI0?si=SieO8-UZ40ULpjKX
No it doesn't. This is very limited and very a "workaround" (nicely speaking) solution
D
No it doesn't. This is very limited and very a "workaround" (nicely speaking) solution
If we had thrown more Antonys at the problem, Boost would have these features way sooner. The community wants to write javascript providing 2+ ways of doing the same, clearly
Danya🔥
If we had thrown more Antonys at the problem, Boost would have these features way sooner. The community wants to write javascript providing 2+ ways of doing the same, clearly
This is stupid. Hacking something to use it for the thing it's not intended for is just not a solution and never will be.
VK
I just wanted notes
klimi
it's in the pinned message
Danya🔥
We need to ban asking for notes here
Danya🔥
Sorry
/warn pming
Rose
Sorry
User Vivek.​S has 1/2 warnings; be careful! Reason: pming
Rose
User Rajat has 1/2 warnings; be careful! Reason: homework/assignment demand
Rose
User Levis Orina has 1/2 warnings; be careful! Reason: no hello
Rose
Another one bites the dust...! Banned Levis Orina. Reason: spam
Rose
Another one bites the dust...! Banned Itachi. Reason: pm, spam, illegal
Simple Sorcerer
Hi all
Simple Sorcerer
Can you suggest a library to work with eddsa ?
Rose
That's 2/2 warnings; Amisha is banned! Reasons: 1: ad 2: linkedin ad
….
#projects
Rose
#projects
Please check the Resources section for links on Open Source Projects in C/C++ some of which are explained from scratch.
Lan
how to learn design pattern using c++? are there some useful projects?
Simple Sorcerer
how to learn design pattern using c++? are there some useful projects?
Some projects have a section Hacking. Usually it says how to take part in the development of the project
Simple Sorcerer
And it also says how they prefer to conduct development. (This is in all large projects)
Simple Sorcerer
I think reading how they prefer to conduct joint development is what you need
Lan
Thank U, and do you have some recommended open source projects? there are too much information on the Google, and I don't know how to choose a project that is right for me😢
Asahi
tor ?)
Its only a guess but, it seems they want to "Contribute to Open Source".
Asahi
Thank U, and do you have some recommended open source projects? there are too much information on the Google, and I don't know how to choose a project that is right for me😢
What are your interests? I like game dev, so I go around looking at issues for anything related. I also don't feel that u need to commit to a single project.
Lan
What are your interests? I like game dev, so I go around looking at issues for anything related. I also don't feel that u need to commit to a single project.
I'm just a beginner, and I want to learn how to build a complete project properly by myself. I'm also interest in game dev, but I don't have enough ability now. I guess I should begin with dev some small tools?
Asahi
I'm just a beginner, and I want to learn how to build a complete project properly by myself. I'm also interest in game dev, but I don't have enough ability now. I guess I should begin with dev some small tools?
How much of a beginner are you? I know some people who are skilled but call themselves beginners. This is a rough measure but, open up any project in github (don't care how hard or easy it is) n read through the code. How much of it can u make sense off and how fast?