-

   rss_rss_hh_full

 - e-mail

 

 -

 LiveInternet.ru:
: 17.03.2011
:
:
: 1

:


[CppCon 2017] : C++

, 30 2017 . 19:13 +
Fil 19:13

[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++ ( ):


    • , .
    • (/, RAII).
    • .
    • , .
    • , .
    • , .


    C++ C, Java, C++98 , 10 . . , , , " ", " ", " 5 ". , . , , . , , . , , [ ].


    ++?


    • , ISO ++
    • -

    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:

    [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);
    }

    • ES.20:
    • F.21: tuple, ( structured binding).

    Error_code err; //:  
    //...
    Channel ch = Channel::open(s, &err); //out-:  
    if(err) { ... }
    
    :
    auto [ch, err] = Channel::open(s) //structured binding
    if(err) ...

    ?


    • E.1:
    • E.2: ,
    • E.3:

    auto ch = Channel::open(s);

    ? , .


    :


    "" C++ . :


    istream& init_io()
    {
        if(argc > 1)
            return *new istream { argv[1], "r" };
        else
            return cin;
    }

    • P.8:
    • R.11: new delete
    • R.4: Raw- (T&)


    • P.1:
    • NL.1: ,
    • NL.2:
    • NL.3:

    //
    auto x = m * v1 + vv // m  v1   vv
    
    //
    void stable_sort(Sortable& c)
    //c "c"  ,  "<"
    //     ( "==")
    {
        //...   
    }

    Philosophy rules


    github Philosophy rules, .


    Core guidelines


    . - , , , , .


    2 : , Core Guidelines, GSL guidelines support library ( Microsoft).


    No Garbage Collector!


    ? ?


    , . .



    [ 5 , ]


    Core Guidelines . ?

    . , . , .


    ? random [ , ]?

    , .


    3 C++. ?

    , , , .


    . , , , C++. ?

    , . .


    ,

    .


    mmatrosov: , . , ?

    . , , lock-free .

    Original source: habrahabr.ru (comments, light).

    https://habrahabr.ru/post/339036/

    :  

    : [1] []
     

    :
    : 

    : ( )

    :

      URL