-

   rss_rss_hh_new

 - e-mail

 

 -

 LiveInternet.ru:
: 17.03.2011
:
:
: 51

:


[ ] C++14

, 08 2017 . 11:10 +
( ) antoshkka C++14.

C++ , C++14. . - POD , - :

struct complicated_struct {
    int i;
    short s;
    double d;
    unsigned u;
};

, , :

#include 
#include "magic_get.hpp"

struct complicated_struct { /*  */ };

int main() {
    using namespace pod_ops;
    complicated_struct s {1, 2, 3.0, 4};
    std::cout << "s == " << s << std::endl; // Compile time error?
}

main, , - aggregate , std::cout. , , : , . , :

antoshkka@home:~$ ./test
s == {1, 2, 3.0, 4}

->

https://habrahabr.ru/post/344206/

:  

: [1] []
 

:
: 

: ( )

:

  URL