考虑到程序员编码的方便性,标准规定了五花八门的 export 语法。如下所示
// Export everything within the block.
export
{
int some_number = 123;
class foo
{
public:
void invoke() { }
private:
int count_ = 0;
};
}
// Export namespace.
export namespace demo::test
{
struct tIPS
{
int abc;
}
void free_func() { }
}
// Export a free function.
export void here_is_a_function() { }
// Export a global variable.
export int global_var = 123;
// Export a class.
export class test
{
};
可以export 模板吗?
--
FROM 42.234.95.*