Difference between size_t and std::size_t

后端 未结 3 1634
鱼传尺愫
鱼传尺愫 2020-12-07 12:36

What are the differences between size_t and std::size_t in terms of where they are declared, when they should be used and any other differentiating

3条回答
  •  无人及你
    2020-12-07 13:17

    std::size_t is in fact stddef.h's size_t.

    cstddef gives the following:

    #include 
    namespace std 
    {
      using ::ptrdiff_t;
      using ::size_t;
    }
    

    ...effectively bringing the previous definition into the std namespace.

提交回复
热议问题