[CppCon 2017] : C++ |
CppCon 2017, youtube- . , . , , , .
. , , . , . .
Disclaimer: , , , "" , . : "( 1)( )( 2)". , . , , .
, , , , . C++.
, , . . - , , . , , . , . StackOverflow, Reddit, .. . , .
, , C++. .
, , . . " " " , ", , " ".
. , signed short
unsigned int
[ , C++]. . , .
, . .
C++ , . 697 , sort 100 . , stl , . : Linked List Hash table , stl.
[ clever , - , ]
" " . .
. . , . , " ". , .
. . " , , . , ". , , , , .
, , , , : ", , . , ". .
, "".
. , IDE, , , , , , . ( Turbo C++ 4.0 :( )
. , , , Raspberry Pi, .. , . . , .
? . , , , , , C++ . , , , C++. 5 .
, C++, , " ".
? . . . . , . . , . , .
, , . , , "". , . " ". , . .
- , GUI. , Mac, Linux, Windows, .
"", , .
. , "". - .
. , .
:
import bundle.entry_level; //
import bundle.enthusiast_level; //
import bundle.professional_level; //
( ):
import grahics.2d;
import grahics.3d;
import professional.graphics.3d;
import physlib.linear_algebra;
import boost.XML;
import 3rd_party.image_filtering;
? . . .
> download gui_xyz
> install gui_xyz
, IDE:
import gui_xyz; //
C++ ( ):
C++ C, Java, C++98 , 10 . . , , , " ", " ", " 5 ". , . , , . , , . , , [ ].
2 C++ Core Guidelines. . , Microsoft Red Hat.
. 5 . . . , .
. :
//1
int max = v.size();
for(int i = 0; i < max; ++i)
//2
for (auto x : v)
2 1? 2 , v , . , 1 . goto , .
[I.4 Core Guidelines]
void blink_led1(int time_to_blink) // -
void blink_led2(milliseconds time_to_blink) //
void use()
{
blink_led2(1500); //: ?
blink_led2(1500ms);
blink_led2(1500s); //:
}
[ milliseconds - Chrono, . , Chrono. , ]
template
void blink_led(duration time_to_blink)
{
auto ms_to_blink = duration_cast(time_to_blink);
}
void use()
{
blink_led(2s);
blink_led(1500ms);
}
Error_code err; //:
//...
Channel ch = Channel::open(s, &err); //out-:
if(err) { ... }
:
auto [ch, err] = Channel::open(s) //structured binding
if(err) ...
?
auto ch = Channel::open(s);
? , .
"" C++ . :
istream& init_io()
{
if(argc > 1)
return *new istream { argv[1], "r" };
else
return cin;
}
//
auto x = m * v1 + vv // m v1 vv
//
void stable_sort(Sortable& c)
//c "c" , "<"
// ( "==")
{
//...
}
github Philosophy rules, .
. - , , , , .
2 : , Core Guidelines, GSL guidelines support library ( Microsoft).
, . .
[ 5 , ]
Core Guidelines . ?
. , . , .
? random [ , ]?
, .
3 C++. ?
, , , .
. , , , C++. ?
, . .
,
.
mmatrosov: , . , ?
. , , lock-free .