C++核心准则​GSL.util:实用程序

面向对象思考

共 1506字,需浏览 4分钟

 ·

2020-11-17 22:59

GSL.util: Utilities

GSL.util:实用程序

  • finally // finally(f) makes a final_action{f} with a destructor that invokes f

    finally//finally(f)使用调用f的析构函数生成一个final_action {f}

  • narrow_cast // narrow_cast(x) is static_cast(x)

    narrow_cast//narrow_cast(x)是static_caststatic_cast(x)

  • narrow // narrow(x) is static_cast(x) if static_cast(x) == x or it throws narrowing_error

    narrow_cast//如果static_cast (x)== x或抛出throwing_error错误,那narrow_cast(x)就是static_cast (x)

  • [[implicit]] // "Marker" to put on single-argument constructors to explicitly make them non-explicit.

    [[implicit]] //放入单参数构造函数的“标记符”,以明确地使它们成为非显式的。

  • move_owner // p = move_owner(q) means p = q but ???

    move_owner // p = move_owner(q)表示p = q,但???

  • joining_thread // a RAII style version of std::thread that joins.

    join_thread //RAII风格版本的结合std :: thread。

  • index // a type to use for all container and array indexing (currently an alias for ptrdiff_t)

    index //用于所有容器和数组索引的类型(当前是ptrdiff_t的别名)


原文链接

https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#gslutil-utilities


新书介绍

《实战Python设计模式》是作者最近出版的新书,拜托多多关注!

本书利用Python 的标准GUI 工具包tkinter,通过可执行的示例对23 个设计模式逐个进行说明。这样一方面可以使读者了解真实的软件开发工作中每个设计模式的运用场景和想要解决的问题;另一方面通过对这些问题的解决过程进行说明,让读者明白在编写代码时如何判断使用设计模式的利弊,并合理运用设计模式。

对设计模式感兴趣而且希望随学随用的读者通过本书可以快速跨越从理解到运用的门槛;希望学习Python GUI 编程的读者可以将本书中的示例作为设计和开发的参考;使用Python 语言进行图像分析、数据处理工作的读者可以直接以本书中的示例为基础,迅速构建自己的系统架构。




觉得本文有帮助?请分享给更多人。

关注微信公众号【面向对象思考】轻松学习每一天!

面向对象开发,面向对象思考!



浏览 39
点赞
评论
收藏
分享

手机扫一扫分享

举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

举报