-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME.md.template
105 lines (60 loc) · 3.79 KB
/
README.md.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
Modern C++ examples
===================
Are you looking for a collection of short straightforward snippets of
modern C++ covering the core features in C++11 and beyond? Of course
you are!
As I'm constantly learning C++ myself (disclaimer, I'm not an expert,
just enthusiastic), I wanted to create some simple examples of each
of the main features of the language. You can build each example
individually or as a whole.
Let me know if this is useful to anyone or if there are any areas you want
covered. Suggestions, enhancements and errata welcome.
This is a (probably perpetual) work in progress!
[How to print hello world in color in C++, because why not](hello_world_color/README.md)
[How to use read a file in far too many ways](std_file_read/README.md)
[How to use scoped enums](scoped_enums/README.md)
[How to use std::initializer_list](initializer_lists/README.md)
[How to use std::initializer_list with your own container like class](initializer_lists_with_custom_vector/README.md)
[How to use constexpr for fame and profit](constexpr/README.md)
[How to use decltype](decltype/README.md)
[How to use range-based for loops](range_based_for_loop/README.md)
[How to use range-based for loops with your own iterator](range_based_for_loop_custom_begin_end/README.md)
[How to use lambdas](lambda/README.md)
[How to use std::to_string with custom classes and templates](std_to_string/README.md)
[How to use std::for_each and how it differs from std::transform](std_for_each_and_transform/README.md)
[How to use std::map with a custom key](std_map_with_custom_key/README.md)
[How to use std::map for reverse sorting](std_map_reverse_sort/README.md)
[How to use std::unordered_map](std_unordered_map/README.md)
[How to use std::multiset and std::multiset::equal_range](std_multiset/README.md)
[How to use std::set](std_set/README.md)
[How to use std::unordered_set](std_unordered_set/README.md)
[How to use std::sort with a custom container and iterators](std_sort_with_custom_iterators/README.md)
[How to use std::function and the 'using' keyword](std_function_and_using/README.md)
[How to use std::bind](std_bind/README.md)
[How to use std::bind with methods or proxy functions](std_bind_with_a_method/README.md)
[How to use std::bind with callback inside a class](std_bind_with_a_class_callback/README.md)
[How to use std::move to avoid the cost of temporaries](std_move/README.md)
[How to use std::forward to invoke the exactly correct function through a template](std_forward/README.md)
[How to use std::unique_ptr](std_unique_ptr/README.md)
[How to use std::unique_ptr with a custom deallocator](std_unique_ptr_with_custom_deallocator/README.md)
[How to use std::unique_ptr for file handling](std_unique_ptr_for_file_handling/README.md)
[How to use std::shared_ptr](std_shared_ptr/README.md)
[How to use std::shared_ptr with your own wrapper for extra debugging](std_shared_ptr_wrapper/README.md)
[How to use std::thread in three different ways](std_thread/README.md)
[How to use std::thread and std::mutex to implement a timeout around a function](std_thread_timeout/README.md)
[How to use variadic templates for recursion instanity](variadic_templates/README.md)
[How to use std::thread and variadic templates to call a function with variable number and types of args](std_thread_timeout_template/README.md)
[How to use std::function with variadic templates](std_function_with_variadic_template/README.md)
[TODO How to use std::remove_if and std::erase](TODO/README.md)
[TODO How to use std::erase_if](TODO/README.md)
[TODO How to use std::mutex](TODO/README.md)
[TODO How to use std::chrono](TODO/README.md)
[TODO How to use std::accumulate and std::reduce](TODO/README.md)
To build all the examples, just do:
```C++
make
```
To build all the examples and the documentation and run every examle, do:
```C++
sh ./RUNME
```