you are viewing a single comment's thread
view the rest of the comments
[–] 11 points 11 months ago* (1 child)

Summary

If you want fast compile times, be careful with functions using auto as a return type in header files.

  • source
  • hideshow 2 child comments
  • [–] 3 points 11 months ago (3 children)

    Why the fuck do people do this to themselves.

  • source
  • parent
  • hideshow 6 child comments
  • [+] 5 points 11 months ago* (last edited 9 months ago) (1 child)
  • [–] 3 points 11 months ago (1 child)

    Nuter one of the main reasons for headers: documentation.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 11 months ago (1 child)

    I think you're conflating regular auto use with using it as a return type/argument. The latter is syntactic sugar for declaring a template. It isn't any less "documented" than doing a template<class ReturnType>....

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 11 months ago (1 child)

    From my discussion with C++ folk, auto is just part of the "modern" way of doing c++. Paired with the -> return type. Perhaps including that -> return type negates this problem? It's still strange to me. Feels more like Rust

  • source
  • parent
  • hideshow 2 child comments