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 &);
相关推荐
陈增林4 分钟前
基于 PyQt5 的多算法视频关键帧提取工具
开发语言·qt·算法
郝学胜-神的一滴15 分钟前
Linux系统函数stat和lstat详解
linux·运维·服务器·开发语言·c++·程序人生·软件工程
编程岁月20 分钟前
java面试-0141-java反射?优缺点?场景?原理?Class.forName和ClassLoader区别?
java·开发语言·面试
、花无将28 分钟前
PHP:配置问题从而导致代码运行出现错误
开发语言·php
小小测试开发35 分钟前
pytest 库用法示例:Python 测试框架的高效实践
开发语言·python·pytest
BUG弄潮儿44 分钟前
go-swagger标准接口暴露
开发语言·后端·golang
数字化顾问1 小时前
Flink ProcessFunction 与低层级 Join 实战手册:实时画像秒级更新系统
java·开发语言
qq_339191141 小时前
go win安装grpc-gen-go插件
开发语言·后端·golang
疯狂吧小飞牛1 小时前
Lua中,表、元表、对象、类的解析
开发语言·junit·lua
owCode2 小时前
3-C++中类大小影响因素
开发语言·c++