From d5b5504d4a5b046bb54a99e271375a7a7493eb4c Mon Sep 17 00:00:00 2001 From: johannst Date: Thu, 19 Mar 2020 21:48:39 +0100 Subject: added c++ section --- src/c++.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/c++.md (limited to 'src/c++.md') diff --git a/src/c++.md b/src/c++.md new file mode 100644 index 0000000..d9fbbda --- /dev/null +++ b/src/c++.md @@ -0,0 +1,12 @@ +# c++ + +## Type deduction + +Force compile error to see what `auto` is deduced to. +```cpp +auto foo = bar(); + +// force compile error +typename decltype(foo)::_; +``` + -- cgit v1.2.3