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 &);
相关推荐
moringlightyn3 分钟前
进程控制(程序替换+自定义Shell)
linux·服务器·c++·笔记·c·shell·进程
心无旁骛~5 分钟前
python多进程multiprocessing——spawn启动方式解析
开发语言·python
@Aurora.9 分钟前
优选算法【专题二:滑动窗口】
算法
小石头 1008614 分钟前
【Java】String类(超级详细!!!)
java·开发语言·算法
conkl17 分钟前
Python中的鸭子类型:理解动态类型的力量
开发语言·python·动态·鸭子类型·动态类型规划
小小8程序员18 分钟前
swift的inout的用法
开发语言·ios·swift
.柒宇.19 分钟前
力扣hot100---42.接雨水(java版)
java·算法·leetcode
youngee1125 分钟前
hot100-41验证二叉搜索树
算法
迈巴赫车主26 分钟前
蓝桥杯20534爆破 java
java·数据结构·算法·职场和发展·蓝桥杯
ULTRA??26 分钟前
利用运动规划库OMPL的全局路径规划ROS插件(使用informedRRTstar,AI辅助完成)
c++