Trick with chocolate works fine on children and experienced programmers. Crossplatform like C++ at all.
@bareya6 жыл бұрын
Chocolates, the most important part of constexpr education
@TrueWodzu6 жыл бұрын
That was a good talk, Scott seems to be very nice guy :) Chocolate stuff needs just a bit of optimization :)
@pizzabeerengineering24885 жыл бұрын
Great talk. constexpr can reduce executable footprint but I used constexpr to compute a lookup table, greatly increasing code size in exchange for eliminating runtime calculation
@RobBCactive3 жыл бұрын
I did similar in C by modifying the developed initialiser code to also write C for the table to stdout, which was put in an include file, allowing the original computation to be conditionally replaced, yet be regenerateable. Sometimes programs literally do write parts of themselves!
@bdafeesh6 жыл бұрын
Great talk with a great speaker. But this talk should have had 1/5 of the interruptions. Even if I was there I would have been annoyed. Some questions are good, but this was way too many.
@valetprivet22329 жыл бұрын
that chocklate experiment was a bad idea ...
@graphicsRat8 жыл бұрын
This is one of my top two favourite talks at cppcon2015 for the reason that it explains the basis of a new C++11 concept, namely constexpr. Scott if you're reading this first of all thank you. Secondly consider more introductory talks on C++11 features, for example variadic templates (Alexandrescu's presentation is the only one that I am aware of).
@vertigo69826 жыл бұрын
This comment is now deprecated.
@krytharn6 жыл бұрын
Anyone else noticed the typo? "constexpor: Introduction" in the column on the left.
@xpwnx1337 Жыл бұрын
There was a student that asked if the constexpr was part of the data type of that function he showed and the proffessor said it isn't. But it is. The return value becomes a constexpr return value.
@prateekchs5 жыл бұрын
@17.06: Is that really true that we can't have non static member which is also constexpr??...i doubt because static in struct/class has different meaning than deducing something at compile time
@binarytv29042 жыл бұрын
this was eye opening! thank you so much.
@CppCon2 жыл бұрын
Glad it was helpful!
@subhamdubeyinfoАй бұрын
Great Talk! Very Informative
@MarekKnapek9 жыл бұрын
Is it possible to overload on `constexpr`? For example I have two algorithms for computing the same output and one is slow but can be made `constexpr` (slow compilation but zero time during run time) the other is faster (big O style faster) but cannot be made `constexpr`. More details: reddit.com/r/cpp/comments/3o52xh/cppcon_2015_scott_schurr_constexpr_introduction/cvu2zf0
@lincolnsand51274 жыл бұрын
I don't know, but you can overload on template enum class values
@bareya7 жыл бұрын
I just watched this video to see if he runs out of the chocolates...
@badasahog3 жыл бұрын
is a constexpr function the same thing as a pure function?
@sufficientlyoldskool7 жыл бұрын
This guy seems nice, I like him.
@LaurentLaborde2 жыл бұрын
too many questions but super good stuff anyway ! thx !
@johan566 жыл бұрын
I gave up halfway through. All the chocolate made the talk completely unwatchable. It's a pity - it could have been a good talk.
@merictunc4 жыл бұрын
Great start to great talk
@JosefdeJoanelli3 жыл бұрын
Love me some constexpooooor
@tissuepaper99622 жыл бұрын
I wish people in the comments would stop crying. Have they never been to a workshop-type talk?
@rocknroooollllll8 жыл бұрын
I'm sure its a laudable idea this chocolate thing but please: for talks which probably have more of an online audience, please don't do that. Just try watching through your own presentation. It's really hard work: while encouraging questions is all fine & dandy, as an online viewer I found the number of interruptions difficult to deal with. It really, really badly disrupted the flow. I am *really* interested in the subject, but could easily switch off after 20 minutes because its just so damn annoying!
@anfield63217 жыл бұрын
Think of it this way. You can pause, think and rewind if needed. If you close it after 20 mins you can come back and watch it later
@malharjajoo73937 жыл бұрын
Can you stop crying ?
@lindomar18386 жыл бұрын
you need psychological treatment. or pay for a c ++ programming course ... to have the right to cry.
@zackeemkhan17246 жыл бұрын
I cannot endure this chocolate throwing. This is so annoying.
@Qwantopides Жыл бұрын
Agreed. Too many interruptions. Asking questions all the time without knowing what the rest of the presentation will be about is just a waste of time, as most questions will be answered right on the next slide.
@origamibulldoser16189 жыл бұрын
Can you static_assert(false, ""); instead of throw in const_expr functions?
@whatsup95614 жыл бұрын
void foo() throw(X,Y) is deprecated.
@zackeemkhan17246 жыл бұрын
FWIW please don’t do this chocolate thing again in the MIDDLE of the talk.
@anokhkishore7 жыл бұрын
Chocolate chocolate chocolate constexpr chocolate .... heard chocolate more than constexpr .. too slow .... waste of time
@origamibulldoser16189 жыл бұрын
I feel like C++ is become an artform for its own sake.. It's entertaining but is it really productive?
@paulfunigga8 жыл бұрын
Yea, but you don't have to learn all of it, just the basics when you apply for a job. Unless you apply for a job as an expert of c++.
@IllumTheMessage7 жыл бұрын
For the majority of people no, but for specialists like some library writers, yes.
@panjak323 Жыл бұрын
And yet we cant get even constexpr sqrt.
@bobweiram63212 жыл бұрын
It says a lot about the complexity of a language when you need to bribe your audience with chocolate in exchange for their participation.
@steve1222887 жыл бұрын
a 1 hr long introduction? cmon this is 2017 enough of the bullshit scam college crap