用好C++的智慧

1. unnamed namespace

在翻译 google test 的 testing private method 的时候,遇到这个问题:static & unnamed namespace

SO:Why are unnamed namespaces used and what are their benefits?

以及升级版的问题:(C++ 的 unnamed namespace vs C 的 static)

Why is an unnamed namespace used instead of static?

posted on 2015-11-04 10:28  vczh_tonyc  阅读(186)  评论(0编辑  收藏  举报

导航