From f8a2979da72e1befc204a1f1c0a90b53b1b9d7f1 Mon Sep 17 00:00:00 2001 From: Changkun Ou Date: Fri, 19 Jul 2019 18:33:06 +0200 Subject: [PATCH] code: update head comments --- code/10/10.1.without.concepts.cpp | 10 ++++++++++ code/10/10.2.concepts.cpp | 10 ++++++++++ code/6/{6.1.cpp => 6.1.regex.cpp} | 4 ++-- code/7/7.4.futures.cpp | 2 +- code/7/7.5.producer.consumer.cpp | 2 +- code/7/7.6.atomic.cpp | 9 +++++++++ code/7/7.6.bad.example.cpp | 9 +++++++++ code/7/7.7.is.lock.free.cpp | 9 +++++++++ code/7/{7.8.mem_order.cpp => 7.8.memory.order.cpp} | 9 +++++++++ code/9/9.1.noexcept.cpp | 4 ++-- code/9/9.2.literals.cpp | 4 ++-- code/9/9.3.alignment.cpp | 10 ++++++++++ 12 files changed, 74 insertions(+), 8 deletions(-) rename code/6/{6.1.cpp => 6.1.regex.cpp} (96%) rename code/7/{7.8.mem_order.cpp => 7.8.memory.order.cpp} (92%) diff --git a/code/10/10.1.without.concepts.cpp b/code/10/10.1.without.concepts.cpp index 13a5e9f..b708a05 100644 --- a/code/10/10.1.without.concepts.cpp +++ b/code/10/10.1.without.concepts.cpp @@ -1,3 +1,13 @@ +// +// 10.1.without.concepts.cpp +// chapter 10 cpp20 +// modern c++ tutorial +// +// created by changkun at changkun.de +// https://github.com/changkun/modern-cpp-tutorial +// + + #include #include diff --git a/code/10/10.2.concepts.cpp b/code/10/10.2.concepts.cpp index d1752d9..cb7a1a9 100644 --- a/code/10/10.2.concepts.cpp +++ b/code/10/10.2.concepts.cpp @@ -1,3 +1,13 @@ +// +// 10.2.concepts.cpp +// chapter 10 cpp20 +// modern c++ tutorial +// +// created by changkun at changkun.de +// https://github.com/changkun/modern-cpp-tutorial +// + + #include #include #include diff --git a/code/6/6.1.cpp b/code/6/6.1.regex.cpp similarity index 96% rename from code/6/6.1.cpp rename to code/6/6.1.regex.cpp index fe1f540..6fc8bcc 100644 --- a/code/6/6.1.cpp +++ b/code/6/6.1.regex.cpp @@ -1,11 +1,11 @@ // -// 6.1.cpp +// 6.1.regex.cpp +// chapter 06 regular expression // modern c++ tutorial // // created by changkun at changkun.de // https://github.com/changkun/modern-cpp-tutorial // -// Regular Expression #include #include diff --git a/code/7/7.4.futures.cpp b/code/7/7.4.futures.cpp index 47cd575..7ab3f0d 100644 --- a/code/7/7.4.futures.cpp +++ b/code/7/7.4.futures.cpp @@ -1,5 +1,5 @@ // -// 7.2.critical.section.a.cpp +// 7.4.futures.cpp // chapter 7 parallelism and concurrency // modern c++ tutorial // diff --git a/code/7/7.5.producer.consumer.cpp b/code/7/7.5.producer.consumer.cpp index 3ca98cd..24a1a96 100644 --- a/code/7/7.5.producer.consumer.cpp +++ b/code/7/7.5.producer.consumer.cpp @@ -1,5 +1,5 @@ // -// 7.5.cpp +// 7.5.producer.consumer.cpp // chapter 7 parallelism and concurrency // modern c++ tutorial // diff --git a/code/7/7.6.atomic.cpp b/code/7/7.6.atomic.cpp index 3d59425..1b9529b 100644 --- a/code/7/7.6.atomic.cpp +++ b/code/7/7.6.atomic.cpp @@ -1,3 +1,12 @@ +// +// 7.6.atomic.cpp +// chapter 7 parallelism and concurrency +// modern c++ tutorial +// +// created by changkun at changkun.de +// https://github.com/changkun/modern-cpp-tutorial +// + #include #include #include diff --git a/code/7/7.6.bad.example.cpp b/code/7/7.6.bad.example.cpp index 04b5f63..f16f305 100644 --- a/code/7/7.6.bad.example.cpp +++ b/code/7/7.6.bad.example.cpp @@ -1,3 +1,12 @@ +// +// 7.6.bad.example.cpp +// chapter 7 parallelism and concurrency +// modern c++ tutorial +// +// created by changkun at changkun.de +// https://github.com/changkun/modern-cpp-tutorial +// + #include #include diff --git a/code/7/7.7.is.lock.free.cpp b/code/7/7.7.is.lock.free.cpp index ea6b107..8e437c0 100644 --- a/code/7/7.7.is.lock.free.cpp +++ b/code/7/7.7.is.lock.free.cpp @@ -1,3 +1,12 @@ +// +// 7.7.is.lock.free.cpp +// chapter 7 parallelism and concurrency +// modern c++ tutorial +// +// created by changkun at changkun.de +// https://github.com/changkun/modern-cpp-tutorial +// + #include #include diff --git a/code/7/7.8.mem_order.cpp b/code/7/7.8.memory.order.cpp similarity index 92% rename from code/7/7.8.mem_order.cpp rename to code/7/7.8.memory.order.cpp index 2dca91c..b7096f3 100644 --- a/code/7/7.8.mem_order.cpp +++ b/code/7/7.8.memory.order.cpp @@ -1,3 +1,12 @@ +// +// 7.8.memory.order.cpp +// chapter 7 parallelism and concurrency +// modern c++ tutorial +// +// created by changkun at changkun.de +// https://github.com/changkun/modern-cpp-tutorial +// + #include #include #include diff --git a/code/9/9.1.noexcept.cpp b/code/9/9.1.noexcept.cpp index c77f885..59ff25e 100644 --- a/code/9/9.1.noexcept.cpp +++ b/code/9/9.1.noexcept.cpp @@ -1,11 +1,11 @@ // -// 8.1.cpp +// 9.1.noexcept.cpp +// chapter 09 others // modern c++ tutorial // // created by changkun at changkun.de // https://github.com/changkun/modern-cpp-tutorial // -// noexcept #include diff --git a/code/9/9.2.literals.cpp b/code/9/9.2.literals.cpp index 3109dfb..668eb19 100644 --- a/code/9/9.2.literals.cpp +++ b/code/9/9.2.literals.cpp @@ -1,11 +1,11 @@ // -// 8.2.cpp +// 9.2.literals.cpp +// chapter 09 others // modern c++ tutorial // // created by changkun at changkun.de // https://github.com/changkun/modern-cpp-tutorial // -// literals #include #include diff --git a/code/9/9.3.alignment.cpp b/code/9/9.3.alignment.cpp index 0cd57eb..947a522 100644 --- a/code/9/9.3.alignment.cpp +++ b/code/9/9.3.alignment.cpp @@ -1,3 +1,13 @@ +// +// 9.3.alignment.cpp +// chapter 09 others +// modern c++ tutorial +// +// created by changkun at changkun.de +// https://github.com/changkun/modern-cpp-tutorial +// + + #include struct Storage {