1renha0
V2EX  ›  C

为什么 c++ string 源码中的类申明是注释的

  •  
  •   1renha0 · Jan 25, 2019 · 3023 views
    This topic created in 2742 days ago, the information mentioned may be changed or developed.

    新手学习中勿喷, 源码大概是这样的

    #ifndef _LIBCPP_STRING #define _LIBCPP_STRING

    /* string synopsis

    namespace std {

    template <class statet=""> class fpos {</class>

    省略...

    */

    大概类似这样,然后更下面的源码是实现,我不明白为什么这一段是被注释的,把类的申明都注释了,后面却一直在实现是什么意思?

    3 replies    2019-01-25 00:44:03 +08:00
    lance6716
        1
    lance6716  
       Jan 25, 2019 via Android
    给自动生成文档的组件用的吧
    lrxiao
        2
    lrxiao  
       Jan 25, 2019
    这只是列一下标准规定的接口。。。下面另有声明 /实现
    1renha0
        3
    1renha0  
    OP
       Jan 25, 2019
    @lrxiao 感谢,是我自己没看到下面的申明
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1012 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 22:52 · PVG 06:52 · LAX 15:52 · JFK 18:52
    ♥ Do have faith in what you're doing.