C++ //练习 18.14 假设下面的operator*声明的是嵌套的命名空间mathLib::MatrixLib的一个成员:

C++ Primer(第5版) 练习 18.14

练习 18.14 假设下面的operator*声明的是嵌套的命名空间mathLib::MatrixLib的一个成员:

cpp 复制代码
namespace mathLIb{
	namespace MatrixLib{
		class matrix { /* ... */ };
		matrix operator*(const matrix &, const matrix &);
		// ...
	}
}

请问你应该如何在全局作用域中声明该运算符?

环境:Linux Ubuntu(云服务器)
工具:vim
解释
cpp 复制代码
namespace mathLIb{
	namespace MatrixLib{
		class matrix { /* ... */ };
		matrix operator*(const matrix &, const matrix &);
		// ...
	}
}

mathLib::MatrixLib::matrix mathlib::MatrixLib::operator*(const matrix &, const matrix &);
相关推荐
AI科技星几秒前
质量定义方程常数k = 4π m_p的来源、推导与意义
服务器·数据结构·人工智能·科技·算法·机器学习·生活
jllllyuz18 分钟前
matlab使用B样条进行曲线曲面拟合
开发语言·matlab
摇摆的含羞草19 分钟前
哈希(hash)算法使用特点及常见疑问解答
算法·哈希算法
农夫山泉2号32 分钟前
【c++】——c++编译的so中函数有额外的字符
java·服务器·c++
ku_code_ku1 小时前
python bert_score使用本地模型的方法
开发语言·python·bert
小马哥编程1 小时前
【软考架构】滑动窗口限流算法的原理是什么?
java·开发语言·架构
仰泳的熊猫1 小时前
1077 Kuchiguse
数据结构·c++·算法·pat考试
云栖梦泽1 小时前
鸿蒙数据持久化实战:构建本地存储与云同步系统
开发语言·鸿蒙系统
wjs20241 小时前
《Ionic 侧栏菜单》
开发语言
祁思妙想1 小时前
linux常用命令
开发语言·python