Pedantic: What Is A Source File? What Is A Header?

前端 未结 5 1584
我在风中等你
我在风中等你 2020-12-31 04:22

For the purposes of this question, I am interested only in Standard-Compliant C++, not C or C++0x, and not any implementation-specific details.

Questions arise from

5条回答
  •  抹茶落季
    2020-12-31 04:54

    Hmmm...

    My casual understanding has been that the distinction between <> includes and "" includes was inherited from c and (though not defined by the standards) the de facto meaning was that <> searched paths for system and compiler provided headers and "" also searched local and user specified paths.

    The definition above seem to agree in some sense with that usage, but restricts the use of "header" to things provided by the compiler or system exclusive of code provided by the user, even if they have the traditional "interface goes in the header" form.

    Anyway, very interesting.

提交回复
热议问题