xiaoweichen / template-metaprogramming-with-cpp Goto Github PK
View Code? Open in Web Editor NEW《Template Metaprogramming with C++ 》的非专业个人翻译
License: Apache License 2.0
《Template Metaprogramming with C++ 》的非专业个人翻译
License: Apache License 2.0
hi xiaowei , 首先十分感谢您无私的奉献,为国内C++的开发者提供国外优秀C++书籍的中文翻译
在此提出几个有可能的翻译问题,也是尽一份绵薄之力
******* 1 中文译本的 91 页
《注释中有几个参考点。[1] 声明了一个名为 parser 的类模板,[2] 定义一个名为 handle 的函数,
该函数以 double 作为参数。类模板的定义在 [3]。该类包含一个名为 run 的方法,该方法调用一个
名为 handle 的函数,其参数值为 42,位于 [4]。》
未在程序里发现 名为 run 的方法
******* 2 中文译本的 121 页
《这个实现使用 std::forward 将左值作为左值传递,将右值作为右值传递,同样适用于可变函数
模板。下面是 std::make_unique 函数的概念实现,其创建了一个 std::unique_ptr 对象:》
这段话下面的程序估计是粘贴错误了,粘贴的程序和上面的程序一模一样,对比了原书确认粘贴错了
应该的程序是
template<typename T, typename... Args>
std::unique_ptr make_unique(Args&&... args)
{
return std::unique_ptr(
new T(std::forward(args)...));
}
*******3 中文译本的 144 页
最下面的程序
template <
2 typename T,
3 typename=typenamestd::enable_if_t< // 没有空格
4 std::is_integral_v>>
5 struct integral_wrapper
******* 4 中文译本的 152 页
图标中的 :
《 is_empty C++11
是否为空类型。空类型是一种类类型 (不是联合体),
是否为空类型。空类型是一种类类型 (不是联合体), // 重复了
没有虚函数,没有虚基类,也没有非空基类。 》
******* 5 中文译本的 202 页
图标中的 :
《 注意,基类模板中的成员函数和派生类中调用的成员函数具有不同的名称。否则,若具有相同称,因为它们不再是虚函数了,派生类成员函数将隐藏基类成员,、。》 // 标点符号问题
******* 6
整个翻译里面 很多处 stirng 都是 作为 粗体蓝色表示,显得很突兀
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.