• lambalicious@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    4
    ·
    9 days ago

    If it’s templated / generic, which IIRC is one of the reasons to try and use auto, then it has to go in the header anyway.

    • beleza pura@lemmy.eco.br
      link
      fedilink
      arrow-up
      1
      ·
      9 days ago

      technically it doesn’t have to (you can always create a .tpp (which is still technically a header, i know, but it isn’t a header header)), but i get what you mean

      • lambalicious@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 days ago

        I mean it has to functionally be a header. Could even be a .c file, filename extensions stopped mattering before we even had C++03 and that’s saying something!