|
You are here |
arne-mertz.de | ||
| | | | |
www.bfilipek.com
|
|
| | | | | The ISO Committee accepted and published the C++17 Standard in December 2017. In this mega-long article, I've built (with your help!) a list of all major features of the new standard. Please have a look and see what we get! Language Features New auto rules for direct-list-initialization static_assert with no message typename in a template template parameter Removing trigraphs Nested namespace definition Attributes for namespaces and enumerators u8 character literals Allow constant evaluation for all non-type template arguments Fold Expressions Unary fold expressions and empty parameter packs Remove Deprecated Use of the register Keyword Remove Deprecated operator++(bool) Removing Deprecated Exception Specifications from C++17 Make exception specifications pa... | |
| | | | |
entangledlogs.com
|
|
| | | | | Generic Programming: Generating part of programs Introduction Generic Programming: Programming with generic parameters to avoid unnecessary code duplication and encourage code reuse. Polymorphism is also another technique to solve code reuse Puts implicit constraints on the generic types that are to be fulfilled by concrete types. template T adder(T LHS, T RHS) { return LHS + RHS; } struct Foo { inv Val = 0; } Foo f = adder(Foo{}, Foo{}): In this code snippet, we assume that Foo meets the requirement tha... | |
| | | | |
eyakubovich.github.io
|
|
| | | | | Suppose we need to write a factory function that constructs a runtime polymorphic object. For the purposes of this post, let's say we want to construct a concrete shape object - a rectangle, triangle, or an ellipse. Here are our basic declarations: 1 2 3 4 5 6 7 8... | |
| | | | |
chadaustin.me
|
|
| | | This may be the only time I weigh in on the static vs. dynamic typing discussion. Each side has its extreme proponents, and people differ in their ability and desire to work in systems with implicit invariants. Many years ago, back when Java and C++ were the Mainstream Languages and Python was the shiny new up-and-comer, I read Bruce Eckel's arguments in support of dynamically typed languages, and some of the nonobvious (at the time) ways you can get more done at higher quality in a more flexible languag... | ||