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 &);
相关推荐
一去不复返的通信er1 小时前
力扣-图论-岛屿数量
算法·leetcode·图论
2501_944521591 小时前
Ramda 跨端三方库仓颉适配全流程
开发语言·javascript·flutter·php
行思理2 小时前
go语言学习难度及适合学习的人群
开发语言·学习·golang
青瓦梦滋2 小时前
WebSocket协议
linux·服务器·网络·c++·websocket·网络协议·http
wangchunyu1143 小时前
JAVA CompletableFuture异步编程实战
java·开发语言·python
程序 代码狂人4 小时前
切片表与分区表的区别(数据开发面试版)
java·大数据·开发语言·数据仓库·算法
HDU-Dade5 小时前
【校招笔试真题】简要介绍 Self-Attention 的前沿算法
人工智能·算法
meiying88385 小时前
快递单号批量查询Python脚本:从手动到自动化的完整实现
开发语言·python·自动化
@大迁世界6 小时前
告别 Go,拥抱 Rust
开发语言·golang·rust
SEO_juper6 小时前
Node.js 重定向链检测工具:301 跳了几跳、有没有成环,一次看清
xml·开发语言·python·node.js·json·bash