...
首页> 外文期刊>Dr. Dobb's Journal >C++ & operator []=
【24h】

C++ & operator []=

机译:C ++和运算符[] =

获取原文
获取原文并翻译 | 示例
   

获取外文期刊封面封底 >>

       

摘要

In this article, I suggest that the current language definition of the C++ subscript operator operator [] is too coarse grained. To illustrate this point, I examine std::map and describe several problems with its design. While these problems could have been avoided without changes to the language, they nonetheless provide stimulus for a discussion of the utility of a new operator—the assigning subscript operator operator []=. Like a lot of programmers, I don't like language-imposed constraints or compiler-specific solutions, so I also examine several measures that may be used to implement custom associative containers and/or address the shortcomings in std::map within the bounds of the current definition of the C++ language and the constraints of current compiler technology.
机译:在本文中,我建议C ++下标运算符operator []的当前语言定义过于粗糙。为了说明这一点,我研究了std :: map并描述了其设计中的几个问题。尽管可以在不更改语言的情况下避免这些问题,但它们仍然为讨论新运算符的实用性(分配下标运算符operator [] =)提供了动力。像许多程序员一样,我不喜欢施加语言约束或特定于编译器的解决方案,因此我还将研究几种可用于实现自定义关联容器和/或解决边界内std :: map缺点的措施。 C ++语言的当前定义以及当前编译器技术的限制。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号