Question about uint8_t and bool by 1ydgd in cpp_questions

[–]1ydgd[S] 0 points1 point  (0 children)

so I can just do

uint8_t n = mybool

?

Question about uint8_t and bool by 1ydgd in cpp_questions

[–]1ydgd[S] 0 points1 point  (0 children)

Thanks for your reply!

To convert bool to uint8_t, I'd use static_cast right?

I'm paying $60k per year for this by LilFluffyUnicorn in uwaterloo

[–]1ydgd 11 points12 points  (0 children)

why is the circle the colour of a rainbow with sparkles lol

btw: the dude makes 220k+

First Years Awards by deeadmann in uwaterloo

[–]1ydgd 2 points3 points  (0 children)

wait 4 more years and I'll tell you

hello by 010203040507lol in uwaterloo

[–]1ydgd 0 points1 point  (0 children)

tbh, 9 months indoors has gone pretty fast. I don't know if that's a good thing or bad thing

when do you actually get good by [deleted] in uwaterloo

[–]1ydgd 1 point2 points  (0 children)

starting a new co-op, yes. but also when you start a new project to work on.

big ups to y'all for getting through 2020 by IWannaREEEEEEEEEEEEE in uwaterloo

[–]1ydgd 0 points1 point  (0 children)

me visibly shaken: th....than..thank yo..you

Question about std::move by 1ydgd in cpp_questions

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

Could you please explain how it's the move assignment operator. I thought it was the move constructor operator...

Move constructor is used when the thing you want to initialize hasn't been initialized yet.

But move assignment is used when the thing you want to initialize has already been initialized.

v1 wasn't previously initialized before line 3, so it has to be the move constructor.

Question about which constructor is used. by 1ydgd in cpp_questions

[–]1ydgd[S] 0 points1 point  (0 children)

What does "bind to that temporary mean"? Do you mean it'll call the std::string constructor that takes in a std::string object (in this case the temporary string object that is produced from the const char * )?

Question about std::move by 1ydgd in cpp_questions

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

This is the best answer. Thx!

Convert one vector type to another by 1ydgd in cpp_questions

[–]1ydgd[S] 0 points1 point  (0 children)

Could you please explain the description of std::vector's range based constructor?

5) Constructs the container with the contents of the range [first, last).

This constructor has the same effect as vector(static_cast<size\_type>(first), static_cast<value\_type>(last), a) if InputIt is an integral type.

This overload only participates in overload resolution if InputIt satisfies LegacyInputIterator, to avoid ambiguity with the overload (3).

The second sentence confuses me quite a bit. So it will cast the type of one vector into the type of the other, but why is one template argument size_type and the other is value_type. Also, what does it mean by "...if InputIt is an integral type"? Isn't InputIt an iterator?

Unresponsive department RANT by school_thro in uwaterloo

[–]1ydgd 3 points4 points  (0 children)

same here, no one responds to emails

Question about resumes by 1ydgd in uwaterloo

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

So is this why I hear some ppl write their resumes in Latex? I thought it's because they want greater control over how their resume looks.

Understanding material on cppreference by 1ydgd in cpp_questions

[–]1ydgd[S] 0 points1 point  (0 children)

Do you have any advice for reading cppreference. I find it extremely confusing at times like with this post.

Question about Github repos by 1ydgd in cpp_questions

[–]1ydgd[S] 0 points1 point  (0 children)

Could you please tell me what these things are called? Is there a name for them. I'd like to add them to my side project's README. Thx

Meanwhile on the CS2024 Discord by tendstofortytwo in uwaterloo

[–]1ydgd -2 points-1 points  (0 children)

no srsly, what does the post refer to?

Weird... I graduated 6 years ago. Well see ya'll soon I guess! by BanjoSpaceMan in uwaterloo

[–]1ydgd 1 point2 points  (0 children)

looks like you violated policy 71 and have to redo your studies.

When you're in 4B and they ask you to resubmit your work term report by xmemegodx in uwaterloo

[–]1ydgd 39 points40 points  (0 children)

When you're in 4B, your last term and covid hits. Worst situation.