C / C ++ t / type underscore (_t / _type) and class names?

I understand that the underscore t ( _t) is used to identify types, like the underscore ( _type) type , often in statements typedef.

  • Is there a slightly different usage (e.g. underscore type for patterns, but t underscore for non-patterns)?

  • Why aren't they used in ads? For example:

    class person_t { };
    enum error_t { };
    

This is different from the previous underscore question t, since it also asks for the difference between the underscore type. In addition (dazzling) it is obvious that both suffixes are just an agreement, but it is not clear why they are both used in the C ++ standard. For example, std :: size_t vs std :: istream :: pos_type.

+4
source share
1

, , , ++.

, _t _type ++, typedef . , uint32_t typedef , 32 . .

, POSIX _t , ++.

+5

Source: https://habr.com/ru/post/1606943/


All Articles