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 分钟前
【STM32基础篇】【嵌入式生态问题及历史追溯】流食般投喂
大数据·开发语言·人工智能·笔记·stm32·嵌入式硬件
charlie11451419125 分钟前
深探std::vector:三指针、扩容与迭代器失效
开发语言·c++·开源项目
看我眼色行事^ \/ ^34 分钟前
2024.05.11 360春招WEB前端编程题
算法
laplaya35 分钟前
ROS常用消息之PointCloud2
c++
一只肥瘫瘫1 小时前
编码器 PLL 角度与速度观测器原理
人工智能·算法
asyxchenchong8881 小时前
R语言混合效应(多水平/层次/嵌套)模型及贝叶斯实现技术应用
开发语言·r语言
熊猫钓鱼>_>1 小时前
从“串数据“焦虑到 Space 自由,我用 Agent Bucket 智能体桶管游戏素材
开发语言·人工智能·游戏·agent·bucket·workbuddy·space
Nil2081 小时前
leetcode 146LRU缓存
算法·leetcode·缓存
沙盘客1 小时前
典型应用与趋势:作战实验、AI 决策与数字孪生
c++·人工智能·经验分享