|
7 | 7 | //! `std::tuple` as possible but also wants to compile faster, uses a better C++20 oriented interface, |
8 | 8 | //! and new features like: |
9 | 9 | //! |
10 | | -//! - a fast to compile tuple implementation |
11 | | -//! - quality of life improvement over the standard tuple implementation |
12 | | -//! - a protocol to adapt user-defined type to act as tuples |
13 | | -//! - algorithm on tuples |
14 | | -//! - record type handling |
| 10 | +//! - A fast to compile tuple implementation |
| 11 | +//! - Quality of life improvement over the standard tuple implementation |
| 12 | +//! - A protocol to adapt user-defined type to act as tuples |
| 13 | +//! - Algorithm on tuples |
| 14 | +//! - Record type handling |
15 | 15 | //! |
16 | 16 | //! # Examples |
17 | 17 | //! |
|
33 | 33 | //! auto student0 = get_student(0); |
34 | 34 | //! |
35 | 35 | //! std::cout << "ID: 0, " |
36 | | -//! << "GPA: " << kumi::get<0>(student0) << ", " |
37 | | -//! << "grade: " << kumi::get<1>(student0) << ", " |
38 | | -//! << "name: " << kumi::get<2>(student0) << '\n'; |
| 36 | +//! << "GPA: " << kumi::get<0>(student0) << ", " |
| 37 | +//! << "grade: " << kumi::get<1>(student0) << ", " |
| 38 | +//! << "name: " << kumi::get<2>(student0) << '\n'; |
39 | 39 | //! |
40 | 40 | //! auto [ gpa1, grade1, name1 ] = get_student(1); |
41 | 41 | //! std::cout << "ID: 1, " |
|
46 | 46 | //! |
47 | 47 | //! auto all_students = kumi::make_tuple(get_student(0),get_student(1),get_student(2)); |
48 | 48 | //! |
49 | | -//! kumi::for_each_index( [](auto i, auto const& m) { std::cout << "Data #" << i << " : " << m << "\n";} |
| 49 | +//! kumi::for_each_index( [](auto i, auto const& m) { |
| 50 | +//! std::cout << "Data #" << i << " : " << m << "\n"; |
| 51 | +//! } |
50 | 52 | //! , all_students |
51 | 53 | //! ); |
52 | 54 | //! std::cout << "\n"; |
|
75 | 77 | //! auto student0 = get_student(0); |
76 | 78 | //! |
77 | 79 | //! std::cout << "ID: 0, " |
78 | | -//! << "GPA: " << kumi::get<"GPA"_f>(student0) << ", " |
| 80 | +//! << "GPA: " << kumi::get<"GPA"_f>(student0) << ", " |
79 | 81 | //! << "grade: " << kumi::get<"grade"_f>(student0) << '\n'; |
80 | 82 | //! |
81 | 83 | //! auto [ gpa1, grade1 ] = get_student(1); |
|
90 | 92 | //! "Ralph Wiggum"_f = get_student(2) |
91 | 93 | //! ); |
92 | 94 | //! |
93 | | -//! kumi::for_each_field( [](auto name, auto const& m) { std::cout << "Student: " << name << ", Data : " << m << "\n";} |
| 95 | +//! kumi::for_each_field( [](auto name, auto const& m) { |
| 96 | +//! std::cout << "Student: " << name << ", Data : " << m << "\n"; |
| 97 | +//! } |
94 | 98 | //! , all_students |
95 | 99 | //! ); |
96 | 100 | //! std::cout << "\n"; |
|
0 commit comments