Why does everybody use unanchored namespace declarations (i.e. std:: not ::std::)?

前端 未结 8 1842
悲&欢浪女
悲&欢浪女 2020-11-30 03:01

It seems to me that using unanchored namespaces is just asking for trouble later when someone puts in a new namespace that happens to have the same name as a root level name

8条回答
  •  Happy的楠姐
    2020-11-30 03:49

    In the same way that names prefixed with _ are reserved, consider std:: as good as reserved.

提交回复
热议问题