Type Inference

suggest change

Versions

[{“Name”:“C++11”,“GroupName”:null}]

Introduction

This topic discusses about type inferencing that involves the keyword auto type that is available from C++11.

Remarks

It is usually better to declare const, & and constexpr whenever you use auto if it is ever required to prevent unwanted behaviors such as copying or mutations. Those additional hints ensures that the compiler does not generate any other forms of inference. It is also not advisible to over use auto and should be used only when the actual declaration is very long, especially with STL templates.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Type inference:
* Type Inference

Table Of Contents
8 Arrays
11 Loops
39 Streams
51 Unions
56 Lambdas
60 SFINAE
62 RAII
67 Sorting
84 RTTI
87 Scopes
104 Profiling
107 Recursion
117 Iteration
122 Type inference
125 Alignment
134 Semaphore
136 Debugging
139 Mutexes
142 decltype