@@ -59,12 +59,38 @@ struct poison_config_size_comp_validator : public detail::default_validator
5959 * \tparam validator_t The validator to use. Defaults to sharg::detail::poison_config_size_comp_validator.
6060 * \details
6161 * * Sizes of sharg::config and sharg::detail::poison_config are the same.
62+ * * sharg::config and sharg::detail::poison_config have the same member types.
6263 * * sharg::detail::poison_config can be constructed with designated initializers from sharg::config's members.
6364 * * sharg::config can be constructed with designated initializers from sharg::detail::poison_config's members.
65+ * The latter two ensure that the order of the members is the same.
6466 */
6567template <typename validator_t = poison_config_size_comp_validator>
6668concept poison_config_valid = (sizeof (poison_config) == sizeof (config<validator_t >))
6769 && requires (config<validator_t > cfg, poison_config poison_cfg) {
70+ {
71+ std::same_as<decltype (cfg.short_id ), decltype (poison_cfg.short_id )>
72+ };
73+ {
74+ std::same_as<decltype (cfg.long_id ), decltype (poison_cfg.long_id )>
75+ };
76+ {
77+ std::same_as<decltype (cfg.description ), decltype (poison_cfg.description )>
78+ };
79+ {
80+ std::same_as<decltype (cfg.default_message ), decltype (poison_cfg.default_message )>
81+ };
82+ {
83+ std::same_as<decltype (cfg.advanced ), decltype (poison_cfg.advanced )>
84+ };
85+ {
86+ std::same_as<decltype (cfg.hidden ), decltype (poison_cfg.hidden )>
87+ };
88+ {
89+ std::same_as<decltype (cfg.required ), decltype (poison_cfg.required )>
90+ };
91+ {
92+ std::same_as<decltype (cfg.validator ), decltype (poison_cfg.validator )>
93+ };
6894 {
6995 poison_config{.short_id = cfg.short_id ,
7096 .long_id = cfg.long_id ,
0 commit comments