请问定义命名空间时,空间名称后加上一个标示符以及(default)是什么意思?书上没见过这种语法啊
如题,在看iostream头文件时看到的这种写法,如下:
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
extern istream cin; /// Linked to standard input
extern ostream cout; /// Linked to standard output
extern ostream cerr; /// Linked to standard error (unbuffered)
extern ostream clog; /// Linked to standard error (buffered)
#ifdef _GLIBCXX_USE_WCHAR_T
extern wistream wcin; /// Linked to standard input
extern wostream wcout; /// Linked to standard output
extern wostream wcerr; /// Linked to standard error (unbuffered)
extern wostream wclog; /// Linked to standard error (buffered)
#endif
//@}
// For construction of filebuffers for cout, cin, cerr, clog et. al.
static ios_base::Init __ioinit;
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
请问在这个命名空间的定义中,跟在std后的_GLIBCXX_VISIBILITY以及(default)是什么作用?为什么可以这么写?
以及在命名空间的定义体内,为什么_GLIBCXX_BEGIN_NAMESPACE_VERSION可以独占一行?这又是起什么作用?为什么可以这么写?