cpp14-snippets
cpp14-snippets copied to clipboard
snippets of what's new in the c++14 standard
C++14 Snippets
Learn the new C++14 features by examples
Description
Source for the references is the free N3936 working draft (pdf), dated 2nd March 2014
clang++3.4 -std=c++1y -stdlib=libc++ -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic xxx.cc
Note: feel free to help out, search for "TODO"
| File | Reference | Description |
|---|---|---|
| literals.cc | tbd | string literals, binary literals, digit separator |
| lambda.cc | tbd | generic lambdas, lambda captures |
| inference.cc | tbd | return type inference |
| iterator.cc | tbd | cbegin, cend |
| constexpr.cc | tbd | relaxed constexpr restrictions, const constexpr |
| make_unique.cc | tbd | make_unique |
| tuple.cc | tbd | get<T> |
| attributes.cc | tbd | deprecated attribute |
| quoted.cc | tbd | quoted |
| exchange.cc | tbd | exchange |
| sequence.cc | tbd | integer_sequence |
| functors.cc | tbd | type deduction for greater<> et al. |
| range.cc | tbd | range overloads for equal, mismatch, is_permutation |
| variable_template.cc | tbd | templated variables |
| initialization.cc | tbd | aggregate initialization, brace elision |
| traits.cc | tbd | aliases for trait's ::type, e.g. is_same_t |
Warning: not a complete list of changes (yet) -- work in progress.
Here's my C++11 edition. But keep in mind: the C++11 edition is from two years ago as I was still learning C++11. And it's not really maintained anymore.