|
JH-Toolkit v1.4.1
An engineering-oriented C++20 toolkit with duck-typed concepts, static design, async coroutines, and semantic containers — header-only, RTTI-free, and concurrency-friendly.
|
POD-compatible aggregate of two values, equivalent in layout to a plain struct. More...
#include <jh/pods/pair.h>
Public Types | |
| using | first_type = T1 |
| Alias for first element type. | |
| using | second_type = T2 |
| Alias for second element type. | |
Public Member Functions | |
| constexpr bool | operator== (const pair &) const =default |
| Member-wise equality comparison. | |
Public Attributes | |
| T1 | first |
| First element. | |
| T2 | second |
| Second element. | |
POD-compatible aggregate of two values, equivalent in layout to a plain struct.
| T1 | First element type. Must satisfy pod_like<T1> and be free of const/volatile qualifiers (i.e. satisfy cv_free_pod_like<T1>). Using const or volatile qualified inner members would break POD layout and trivial assignment guarantees. |
| T2 | Second element type. Must satisfy pod_like<T2> and be free of const/volatile qualifiers (i.e. satisfy cv_free_pod_like<T2>). |
This type provides the simplest form of a pair:
first and second operator== pod::array, pod::tuple, etc.) jh::utils::make_pair, which will automatically select pod::pair when both arguments are POD