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 &);
相关推荐
tang7778943 分钟前
爬虫如何绕过绕过“5秒盾”Cloudflare:从浏览器指纹模拟到Rust求解之不完全指南
开发语言·爬虫·rust·cloudflare
Yuer20251 小时前
什么是 Rust 语境下的“量化算子”——一个工程对象的最小定义
开发语言·后端·rust·edca os·可控ai
hqwest1 小时前
码上通QT实战26--系统设置01-系统设置布局
开发语言·qt·qss·qt基础控件·qt布局控件·qt表格控件
薛定谔的猫19821 小时前
llama-index Embedding 落地到 RAG 系统
开发语言·人工智能·python·llama-index
夏鹏今天学习了吗1 小时前
【LeetCode热题100(78/100)】爬楼梯
算法·leetcode·职场和发展
玖釉-1 小时前
[Vulkan 学习之路] 08 - 给图片穿马甲:图像视图 (Image Views)
c++·windows·图形渲染
jghhh012 小时前
传递对准MATLAB仿真程序
开发语言·matlab
m0_748250032 小时前
C++ 信号处理
c++·算法·信号处理
Ro Jace2 小时前
电子侦察信号处理流程及常用算法
算法·信号处理
yuyanjingtao2 小时前
动态规划 背包 之 凑钱
c++·算法·青少年编程·动态规划·gesp·csp-j/s