[07/23] Add a class that multiplexes two pointer types
Tom Tromey
tom@tromey.com
Thu Dec 17 14:21:49 GMT 2020
>>>>> "Richard" == Richard Sandiford via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
Richard> +// A class that stores a choice "A or B", where A has type T1 * and B has
Richard> +// type T2 *. Both T1 and T2 must have an alignment greater than 1, since
Richard> +// the low bit is used to identify B over A. T1 and T2 can be the same.
It seems like the alignment requirement could be static_assert'd, which
would make using this class a bit safer.
Tom
More information about the Gcc-patches
mailing list