首页> 美国政府科技报告 >SMARTARRAY: A C++ class template for self-describing, resizable, error-resistant arrays
【24h】

SMARTARRAY: A C++ class template for self-describing, resizable, error-resistant arrays

机译:smaRTaRRaY:用于自描述,可调整大小,防错误数组的C ++类模板

获取原文

摘要

The SmartArray class template supports one-dimensional (single index) arrays and provides four major features that make it superior to built-in C++ arrays: a SmartArray is self-describing (both capacity and content), a SmartArray can be dynamically resized, the index supplied to the operator of a SmartArray is bounds checked, and the lower bound of a SmartArray can be chosen by the programmer. Additionally, the SmartArray class provides a full set of traversal functions, an assignment operator, editing functions, and an error handling mechanism-yet remains small, self-contained, portable, efficient, and easy to master. The class template SmartArray requires that T be either a built-in type or a class that provides an assignment operator, a default (no argument) constructor, a copy constructor, and a destructor. If T does not contain any pointers, the compiler-generated versions of these four functions will probably be adequate.

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号