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 &);
相关推荐
tang&17 小时前
【Python自动化测试】Selenium常用函数详解
开发语言·python·selenium
卜锦元18 小时前
Golang项目开发过程中好用的包整理归纳(附带不同包仓库地址)
开发语言·后端·golang
Tony Bai1 天前
“我曾想付钱给 Google 去工作”—— Russ Cox 深度访谈:Go 的诞生、演进与未来
开发语言·后端·golang
sali-tec1 天前
C# 基于halcon的视觉工作流-章66 四目匹配
开发语言·人工智能·数码相机·算法·计算机视觉·c#
小明说Java1 天前
常见排序算法的实现
数据结构·算法·排序算法
45288655上山打老虎1 天前
C++完美转发
java·jvm·c++
hnlgzb1 天前
安卓app开发,如何快速上手kotlin和compose的开发?
android·开发语言·kotlin
行云流水20191 天前
编程竞赛算法选择:理解时间复杂度提升解题效率
算法
无敌最俊朗@1 天前
STL-deque面试剖析(面试复习4)
开发语言
APIshop1 天前
用 Python 把“API 接口”当数据源——从找口子到落库的全流程实战
开发语言·python