How to Adopt Modern C++17 into Your C++ Code : Build 2018

preview_player
Показать описание
Just how different is "Modern C++" from "legacy C++"? Is my codebase ready for C++17? Do I need a full rewrite of my app to modernize my code? If you're looking for answers to some of these questions, join us for a session on how to effectively leverage modern C++17 features in your existing C++ projects; and no, you don't need to rewrite your app.
Рекомендации по теме
Комментарии
Автор

wow, finally, a conference talk with good audio quality

symq
Автор

Awesome! I learned something as a long-time C++ coder.

PatrickTsaiSimply
Автор

I like that he highlight the c++ backward compatibility

Maria-bwsr
Автор

Re-watching it second time... Well delivered material, thank you.

ajlndga
Автор

At 9:30, wouldn't the function that he describes be affected by return value optimization?

mikevictor
Автор

I think operator* for optional is undefined behavior for empty state, if you want an exception you use .value() ala vector's operator[] and .at()

N....
Автор

at 29.47, what is the use of making a unique_ptr when you can do it by creating a object in stack. " auto g= make_unique<gadget>();" to simply "gadget g;"
when a function or code block can safely use a stack-allocated object, like gadget g;, it’s often preferable over a std::unique_ptr<gadget> to avoid unnecessary heap allocation. Using stack allocation (gadget g;) provides better performance, clearer code, and avoids the complexity of pointer management. Can compiler stop such kind of usage?

amit
Автор

At 29:38, why factory() function returns an unique_ptr instead of just an object? Thanks

tauicsicsics
Автор

[About std::variant]"... except for some strange cases in which it can become empty, but that's not part of the feature." Ok, that's a great way to scare away people. Sounds VERY safe to use. Haha

jhbonarius
Автор

Love the presentation - both style and content

ManuAnand
Автор

excellent! practical! no abstract non-sense!

LY-upqr
Автор

It remind me of Rust and its Rustacean. However, love it. Love the video <3

ducnhatphung
Автор

whoever won the spark is lucky, it's endless fun!

GeorgeTsiros
Автор

Hello, can anyone please explain what the 's' does in the code a = "xyzzy"s; on the slide with "any". I see it is a method to convert char * to std::string, but could anyone point to the documentation how it is done?

Kartofkaable
Автор

I see Herb Sutter, I give a thumbs-up

xf
Автор

If C++ supports where: The compiler could automatically analyze usage patterns and decide if an object should be globally or statically allocated, perhaps using a global pool or a special memory region. This could allow objects to be reused without explicit allocations and deallocations, —where the compiler automatically manages memory, optimizes lifetimes, and minimizes unnecessary copies—there would be a reduced need for explicit pointers, smart pointers, and raw pointers

Above is the need, specifically after the White House Notification to stop all unsafe langauges seems to be started hurting the c++ job market.

amit
Автор

So... is it a good idea to make a strong type language a weak type language via autoing everything? Do we really need unit test for a strong type oo language? Doesn't making it weak types require you to always unit test?

foxvulpes
Автор

I find the syntax of shared pointers so cumbersome compared to raw pointers. And the limitation to non circular refs makes it seem a bit hacky.

rbnn
Автор

std::optional will not through on dereference (according to cppreference). I mean, it could, but it would be a bad implementation. It’s undefined behaviour.
Herb probably said this for simplicity. Or this is what Microsoft does unless you beat it over the head with some compiler flag.

denisyaroshevskiy
Автор

I cant see any GUI having a million widgets :D

syntaxed