1. 7
  1.  

  2. 2

    Hey folks, decltype(x) seems so useful that I wonder how people write code without it but in my limited experience I’ve never had to write C++ code that would need this. What kind of algorithms/use cases would this be aimed at? Thanks!

    1. 2

      I think auto, for each and lambdas allow programmers to basically ignore decltype?

      1. 1

        I believe (not a day-to-day C++ programmer) that it would allow you to refer to the return type of a function that returned an anonymous type. Could be useful if you had to give it some kind of declaration (like if you were store it somewhere) since auto is really only useful when calling the function.