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 &);
相关推荐
国服第二切图仔2 分钟前
Rust开发实战之WebSocket通信实现(tokio-tungstenite)
开发语言·websocket·rust
echoyu.11 分钟前
java源代码、字节码、jvm、jit、aot的关系
java·开发语言·jvm·八股
麦麦大数据1 小时前
MacOS 安装Python 3.13【同时保留旧版本】
开发语言·python·macos·python安装
上去我就QWER3 小时前
Qt中如何获取系统版本信息
开发语言·qt
我是苏苏4 小时前
C#高级:程序查询写法性能优化提升策略(附带Gzip算法示例)
开发语言·算法·c#
木木子99994 小时前
业务架构、应用架构、数据架构、技术架构
java·开发语言·架构
sali-tec5 小时前
C# 基于halcon的视觉工作流-章56-彩图转云图
人工智能·算法·计算机视觉·c#
学涯乐码堂主8 小时前
GESP C++ 四级第一章:再谈函数(上)
c++·青少年编程·gesp·四级·学漄乐码青少年编程培训
黑岚樱梦9 小时前
代码随想录打卡day23:435.无重叠区间
算法
微露清风9 小时前
系统性学习C++-第九讲-list类
c++·学习·list