aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c++.md
diff options
context:
space:
mode:
authorjohannst <johannes.stoelp@gmail.com>2020-03-19 21:48:39 +0100
committerjohannst <johannes.stoelp@gmail.com>2020-03-19 21:48:39 +0100
commitd5b5504d4a5b046bb54a99e271375a7a7493eb4c (patch)
treedaf3ffee927ce9c7a030d164bc6427611ad33da4 /src/c++.md
parentc8b29db881f219bcc5ac0f0ebc4c17f4b7708bf8 (diff)
downloadnotes-d5b5504d4a5b046bb54a99e271375a7a7493eb4c.tar.gz
notes-d5b5504d4a5b046bb54a99e271375a7a7493eb4c.zip
added c++ section
Diffstat (limited to 'src/c++.md')
-rw-r--r--src/c++.md12
1 files changed, 12 insertions, 0 deletions
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)::_;
+```
+