cpluspluscourse icon indicating copy to clipboard operation
cpluspluscourse copied to clipboard

Things to fix on 1st/2nd/3rd day of advanced course

Open hageboeck opened this issue 3 years ago • 5 comments

  • Lambda part might be hasty
  • Slide 243 (lambdas) goes to unique_ptr, custom deleters and cuda whereas smart pointers will be introduced much later.
  • Template part is probably too complicated as well
  • Didn't have enough time for RNGs
  • Why are our spans not const in the "Usage" slide?

hageboeck avatar Oct 12 '22 08:10 hageboeck

clang-format

  • question form the audience: how do I specify my own style? (not use --style=LLVM). Maybe add one more example or line saying that by default clang-format will try to find a .clang-format file.
  • should we talk more about IDE integration? like how people should setup their VSCode, or vim etc?
  • should we mention pre-commit hooks?

godbolt:

  • mention usefulness for sharing links/code snippets

  • mention other supported tools? (like running clang-tidy, cppinsights or quickbench from godbolt)

  • mention support for other languages?

  • Fix latex \cpp command to not eat trailing space

  • mention IWUY (include what you use)

bernhardmgruber avatar Oct 12 '22 12:10 bernhardmgruber

During concurrency:

  • Typeset decltype using \texttt
  • Mention std::thread::detach? Detached threads are killed after main returns! That's important to know.
  • Very nice to show the AdePT example for std::async. should we put a simplified version on the slides?
  • Better example for thread_local? Where it actually has an advantage over a local variable.
  • thread_local slide: jthread::join() could be replaced by wrapping an appropriate scope around and let the jthread join in dtor.
  • condition_variable notify_all vs. notify_one

bernhardmgruber avatar Oct 13 '22 14:10 bernhardmgruber

What I collected myself when rehearsing:

  • explain left vs right fold + associativity
  • do we ever explain lvalue and rvalue?
  • add a slide on expansion loci and that we do not need a comma before ...
  • constexpr if deserves a bit more demonstration of its power

bernhardmgruber avatar Oct 13 '22 14:10 bernhardmgruber

my notes from the first day:

  • avoid putting a using namespace ...; declaration into a header file, especially not on the global namespace!
  • Mentioned on slide Pointers vs References: std::optional<T&>. Unfortunately, this is not allowed :/ boost::optional allows it.
  • range-based loop slide: show what the compiler generates under the hood! cppinsights?
  • the operator() of a lambda is also inline by default
  • there was a question about lifetime extension of a temporary by a const reference, maybe add that to the slides?
  • discussion of = default; on special member functions. it does not force the generation. compiler only generates them if they are not ill-formed
  • static_assert is available since C++11, only the version without a message is C++17
  • MyNS is probably not the best choice for a namespace.
  • Hidden Friends and ADL "Accidental conversion example" is not clear enough. maybe split to another slide and contrast a working/non-working example?
  • add a link to https://cdecl.org/
  • Guilherme: s/Real life example/Example/ in this slide (some constexpr slide)
  • noexcept specifier slide: put guideline (Use noexcept on leaf functions...) in a good practice box
  • noexcept operator: add an example definition of f above the constexpr bool callCannotThrow = noexcept(f())
  • we should finally add a slide on value categories (r-value, l-value, x-value)

bernhardmgruber avatar Oct 13 '22 14:10 bernhardmgruber

This issue or pull request has been automatically marked as stale because it has not had recent activity. Please manually close it, if it is no longer relevant, or ask for help or support to help getting it unstuck. Let me bring this to the attention of @klieret @wdconinc @michmx for now.

stale[bot] avatar Oct 13 '23 20:10 stale[bot]