C++ Weekly - Ep 22 C++17's Nested Namespaces and `std::clamp`

preview_player
Показать описание
☟☟ Awesome T-Shirts! Sponsors! Books! ☟☟

T-SHIRTS AVAILABLE!

WANT MORE JASON?

SUPPORT THE CHANNEL

GET INVOLVED

JASON'S BOOKS

► C++23 Best Practices

► C++ Best Practices

JASON'S PUZZLE BOOKS

► Object Lifetime Puzzlers Book 1

► Object Lifetime Puzzlers Book 2

► Object Lifetime Puzzlers Book 3

► Copy and Reference Puzzlers Book 1

► Copy and Reference Puzzlers Book 2

► Copy and Reference Puzzlers Book 3

► OpCode Puzzlers Book 1


RECOMMENDED BOOKS

AWESOME PROJECTS

O'Reilly VIDEOS

Рекомендации по теме
Комментарии
Автор

Just watched your entire series in reverse order (excluding multi-part segments). Keep it up, I enjoy these.

SandSnipr
Автор

I was trying to understand the definition of std::clamp in the video on cppreference for about 3 minutes, then I realized it was wrong back then.

xeco
Автор

I didn't know about std::clamp. I can replace my implementation with this one, thanks!

LAnonHubbard
Автор

I heard of std::clamp first in recent Sean Parent's talk.

janasandeep
Автор

std::clamp is broken the same way as std::min and std::max are: if you pass an rvalue as one of its arguments, you risk getting a dangling reference. Why do they continue adding such dangerous functions to the standard library instead of fixing the old ones? It should be entirely possible with some type_traits' usage and SFINAE tricks (which may be replaced by concepts in the future).

MaceUA
Автор

Have you considered something like UltiSnips or similar for using during live coding? I think it would add a lot to you screencasts, letting you focus on the content instead of accidental syntax errors which are distracting.

Автор

Life is too short to compile through so many steps. Learn how to compile and run with one keystroke from your editor without ever leaving it.

maxxba
visit shbcf.ru