Filtered by life

feeling defeated by c++. I can use so many other languages without much of a profblem but c++ filters me.
i printed several c books at this point and whenever I want to do something like game development or some neat thing in c I realize that everything, every project, every tutorial is for c++.
I've been avoiding c++ like the plague, using gtk instead of qt, using gamedev libraries in c rather than c++. how to cope with being a mediocre programmer that has never used a template or know what the fuck is this template <
template class Cont1,
template class Cont2,
typename T>
void print_container(Cont1 container)
{
for (const auto &c2 : container)
{
for (const auto &v : c2)
{
std::cout

Attached: godHelpMe.png (640x719, 33.67K)

Honestly man, you gotta stop giving a shit what language something is made in. Programming is a craft like carpentry. If a carpenter produces a great looking table, would you give a shit what tools he used? Same thing with a game, why do you care what language a game is made in as long as it's good? If you don't enjoy making games in C++, don't use C++. Why not use Unity or Löve2D or Godot?

because they are mad in c++.....................................AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

c++ is the plague and is wisely avoided

>std::allocator
Why not just replace all instances of T with int then?

just use C#, my man. no need to bang your head against the wall if it doesn't seem to break. it's not like someone is keeping points for coolness and you'll have to do C++ and inline assembly to be appreciated. just make that game with whatever language you can master.

C++ is a mental illness.

Attached: 272763.png (2779x1356, 470.79K)

you can use C++ without all the gay template shit. it's literally just C with a bunch of bullshit added on top, just pick which bullshit you want to use

shouldn't that be a compiler error due to not being able to deduce T? though friend functions seem pretty fucked so who knows, maybe this is indeed standard behavior

If you never used a template then don't try to wrap your head around this nested template fuckery and get down on yourself when you don't get it.
Also this. You'd be surprised how many devs forego templates entirely. I think that's an overcorrection though.

C++ beyond 17 is full cancer and should be avoided

>implying compilers follow standard

they follow it surprisingly closely. most of my code has always compiled on all of MSVC/GCC/Clang with a couple of minor tweaks, and this implies somewhat complicated template shit too.

Switch to C++/latest and use auto instead of templatery

Don't listen to the schizo neet, ultra modern C++ is even better.

>ultra modern C++ is even better
template
concept IsSuitableIntegralFunc = requires(V func) {
{ func(std::declval(), std::declval()) } -> std::same_as;
};
template
[[nodiscard]] constexpr auto add(std::integral auto a, std::integral auto b, decltype(std::declval() + std::declval()) result = decltype(a){} + decltype(b){}) noexcept(
noexcept(std::declval().operator()))
-> std::decay_t requires IsSuitableIntegralFunc {
return IntegralFunc{}(a, b);
}

>hey guys check out this convoluted example I can come up with
>this is totally what C++ is like guise!

this is c++20 features

You just wrote a bunch of C++ keywords in a big jumbled way that made no sense at all. What is your argument? C++20 is bad because some retard can word vomit all the features together into an incomprehensible mess?
It's like saying if statements are bad and giving an example where you nest 100 of them or something like that. Who are you even trying to convince?
Try making sense, you're embarrassing.

this compiles retard

>You just wrote a bunch of C++ keywords in a big jumbled way that made no sense at all.
Which accurately reflects half of modern C++ usage.

Is that really your response? Fuck you're obtuse. 100 nested if statements would also compile. Getting my point now?

I must only be familiar with the other half. Silly me.

this is proper use of those features retard

>100 nested if statements is proper use of if statements
>therefore if statements are bad
Seriously, the fact that you can't even comprehend what im saying and thus not responding to it says it all.
Look everyone! These are the kind of people hating on modern C++! Take note!

>100 nested if statements is proper use of if statements
alright

And why isn't it? You're almost there buddy...
Maybe what you wrote can compile fine, yet at the same time be retarded shit nobody would write on a day to day basis unless they're trying to make the point you're trying to make.

you can write batshit insane code in basically any version of any language, that's not a good argument against it.

i agree, stupid shit like that shouldnt be in the language
false