nat在boost c++库源代码中的含义

Meaning of nat in boost c++ library source

本文关键字:源代码 boost c++ nat      更新时间:2023-10-16

在boost c++库的某些部分中,您可以阅读以下内容:

template<>
struct add_reference<void>
{
  typedef const nat &type;
};

struct nat {int for_bool;};

nat是首字母缩略词吗?如果不是,它的意义是什么?

我在type_traits.hpp中看到了这个nat,它似乎不是一个类型;事实上,对于void的情况,它就像是template<class T> struct add_reference<T&>的特殊化;它似乎代表了对void的引用,它可能是为了实现的完整性。