asio-tr2 icon indicating copy to clipboard operation
asio-tr2 copied to clipboard

Add typedefs to ip namespace for port_type, address_v4 integral type, etc

Open chriskohlhoff opened this issue 10 years ago • 6 comments

chriskohlhoff avatar Feb 27 '15 12:02 chriskohlhoff

I'm adding

typedef uint16_least_t port_type;
typedef uint32_least_t address_v4_uint_type;

Names can be reviewed.

chriskohlhoff avatar Apr 11 '15 02:04 chriskohlhoff

Sound good to me.

mclow avatar Apr 11 '15 02:04 mclow

Applied in 5c04b1d22a8921a4ef0293e13ef3e69d87d80cde.

chriskohlhoff avatar Apr 11 '15 02:04 chriskohlhoff

As part of this change the member function address_v4::to_ulong() has been renamed to to_uint().

chriskohlhoff avatar Apr 11 '15 03:04 chriskohlhoff

Also added scope_id_type.

chriskohlhoff avatar Apr 11 '15 06:04 chriskohlhoff

Pre-Lenexa Summary

[internet.synop]

In Cologne it was requested that new typedefs be added to the <internet> header. The following typedefs have been added:

typedef uint16_least_t port_type;
typedef uint32_least_t address_v4_uint_type;
typedef uint32_least_t scope_id_type;

As part of this change, the member function address_v4::to_ulong() has been renamed to to_uint().

These names should be reviewed by LEWG. I would also like guidance on whether address_v4_uint_type or address_v4::uint_type is preferred.

The change was included in revision 5. An implementation can be found on the master branch of Asio's GitHub repository.

chriskohlhoff avatar May 04 '15 11:05 chriskohlhoff