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 &);
相关推荐
江畔柳前堤17 小时前
roLabelImg 详细安装教程
开发语言·人工智能·后端·云原生
Wang's Blog18 小时前
Go-Zero 项目开发47:自研微服务框架的必要性与核心结构设计
开发语言·微服务·golang
白鸽(二般)18 小时前
MinIO Java Client API
java·开发语言
hPw0eKIqD18 小时前
C++ 模板参数推导问题小记(非推导上下文)
开发语言·c++
程序员爱德华18 小时前
Python与C++:异同点对比
c++·python
临床数据科学和人工智能兴趣组19 小时前
要使用 R Markdown,首先需要安装 R 和 RStudio,接着安装 rmarkdown 包
开发语言·数据挖掘·数据分析·r语言·r语言-4.2.1
普通攻击往后拉19 小时前
Leetcode 206. 反转链表
算法·leetcode·链表
Nebula嵌入式19 小时前
【C语言】09-深入解析main函数
linux·c语言·开发语言·嵌入式
@syh.19 小时前
【贪心】矩阵消除游戏
算法·游戏·矩阵
可编程芯片开发20 小时前
基于零极点配置的PID控制系统simulink建模与仿真
算法