the networking opportunities here at CPP con are well above and beyond any other CP C++ conference that I've ever been [Music] to don't worry don't worry it's not too forbidden um so we're going to play like a game and the game is don't do this at work the game is going to be like I'm I'm going to show you a snippit of code you're going to tell me if it compiles and if it does what the output is please shout the answer that's fine I'm going to give like five to 10 seconds for each question um assume C++ 20 so first of all we have a bullan b equals the true I'm printing Plus+ B does this compile no because bull de bull incrementation got replicated in 17 cool now I have a chart array of size three I'm setting it equal to Pi I'm printing a string what is that output because of the null Terminator plus n Terminator in the end of the string cool so far so good I've seen this in actual code uh so let's see it's in 3D array and I'm doing an un un sign chart pointer pointer array two and I'm setting it equal to the second to the two-dimensional array inside the 3D IND dimensional array and I'm checking if these are equal does this compile and if it does what is the output this doesn't compile the correct uh type is onsign CH pointer of array uh but this would compile and with print true uh if using the second type now I have this is a classic one I have an array and I'm indexing into a number using that array does this compile yeah it does this is equivalent to doing uh addition adding the addresses and then D referencing that all right so I have a varic function that takes in a bunch of arguments and I'm doing an unfold or fold Expressions does this compile you don't have to tell me the answer this does compile and it unfolds to3 -4 -1 M and it's equal to six sure so I have a a struct with a bit field and I'm setting it equal to one I'm adding to that bit field and I'm printing it does it compile and what is the output this does compile it is one and you add one to it it overflows to 2 but the real question is is this undefined Behavior I don't know can anyone tell me in the audience it could be implementation defined that's what I hear cool uh okay this is a fun one struct I with end float and string I'm using aggregate initialization for all these values for i1 I2 and I3 does this compile and what does it print wrong order so this doesn't compile because aggregate initialization has to be in the same order that the members are defined the class by the way the I3 like the rust like syntax with the column this comp this is GCC extension and it works in Clank but not msvc so this is not in the standard um okay I have a Lambda a templated Lambda that takes in T I return 2 plus 2 and I'm calling the line that was Zero but I'm specifying the template is an in what is the output why does it not compile yes you cannot do the int thing syntax on uh Lambda all right so I have a function get if is cont constant evaluated returns three otherwise 14 I have Auto V1 Auto con out of V2 con exper out of V3 and con expert con out of V4 what is the output it does depend uh I have that in here is this guaranteed I don't know I don't think the con out of V2 is guaranteed but con expert should be guaranteed right okay um this is a fun one uh let's see if we have time uh I'm going to skip that one and this is the fun one okay uh L is a struct that inherits from a bunch of types use their operator I have I'm passing a couple lambdas I'm calling it with three 14 and I'm just calling it without any arguments what is the output and doesn't compile I don't think you get a warning I think this is used in this in the standard as a pattern for a standard visit maybe so this does oh maybe yeah conversion yeah that's an error in conversion but it does compile it gives me this uh nice thing all right last one is the fun one so I have a stru T1 uh overloads call Operator stru T2 inherits from T1 overloads call Operator uh to print question mark and then uh if Z inherit from T which is default of the2 it instantiates a t and it calls that call Operator inside it's call Operator uh and I have a deduction guide it says whatever you pass into T or to Z make it a T1 cool I'm instantiating Z1 with T1 Z2 with T2 with with T2 and then Z3 with with the with Z itself and I'm calling it what would the output be all right for sure I'm telling the compiler whatever you pass to Z just make it a T1 so should this should be bang bang bang that is incorrect so let's see what does this do this calls a copying Constructor which is a special member function so that it gets chosen over the template AR uh the uction guide so this prints uh bang bang question mark thank [Applause] you