What is the best explanation for the export keyword in the C++0x standard?

后端 未结 7 1323
后悔当初
后悔当初 2021-02-05 04:50

I know that in the original C++0x standard there was a feature called export.

But I can\'t find a description or explanation of this feature. What is it sup

7条回答
  •  故里飘歌
    2021-02-05 05:22

    See here and here for Herb Sutter's treatment of the subject.

    Basically: export has been implemented in only one compiler - and in that implementation, export actually increases the coupling between template definition and declaration, whereas the only point in introducing export was to decrease this coupling.

    That's why most compilers don't bother. I would have thought they would have just removed export from the language in C++0x, but I don't think they did. Maybe some day there will be a good way to implement export that has the intended use.

提交回复
热议问题