*未指定*在C typedef语句中是什么意思?

我看到这样的声明

typedef *unspecified* value_type;

typedef *unspecified* reference;

在Boost :: multi_array类的声明中.

namespace boost {

template <typename ValueType,std::size_t NumDims,typename Allocator = std::allocator<ValueType> >
class multi_array {
public:
// types:
  typedef ValueType                             element;
  typedef *unspecified*                         value_type;
  typedef *unspecified*                         reference;
  typedef *unspecified*                         const_reference;
  typedef *unspecified*                         difference_type;
  typedef *unspecified*                         iterator;
  typedef *unspecified*                         const_iterator;
  typedef *unspecified*                         reverse_iterator;
  typedef *unspecified*                         const_reverse_iterator;
  typedef multi_array_types::size_type          size_type;
  typedef multi_array_types::index              index;
  typedef multi_array_types::index_gen          index_gen;
  typedef multi_array_types::index_range        index_range;
  typedef multi_array_types::extent_gen         extent_gen;
  typedef multi_array_types::extent_range       extent_range;
  typedef *unspecified*                         storage_order_type;

*未指定*是什么意思?这是C11标准吗?

解决方法

我在文档中假设,而不是可编译的代码,因为它是不可编译的.

通常这样做可以指示typedef可以使用,但是别名的类型取决于实现,并不被视为公共接口的一部分.

在这种情况下,可编译头文件包含以下行号的声明:

typedef typename super_type::value_type value_type;

其中别名类型在基类中定义.更深入地挖掘,反过来来自另一个基类,实际的类型深深地埋在实现细节中,根据数组的维数有不同的定义;这种特定类型是一维数组的ValueType,multi_array< ValueType,NumDims-1>更高的尺寸.

相关文章

本程序的编译和运行环境如下(如果有运行方面的问题欢迎在评...
水了一学期的院选修,万万没想到期末考试还有比较硬核的编程...
补充一下,先前文章末尾给出的下载链接的完整代码含有部分C&...
思路如标题所说采用模N取余法,难点是这个除法过程如何实现。...
本篇博客有更新!!!更新后效果图如下: 文章末尾的完整代码...
刚开始学习模块化程序设计时,估计大家都被形参和实参搞迷糊...