Bit like struct #1051
Answered
by
stephenberry
jbbjarnason
asked this question in
Q&A
Bit like struct
#1051
-
Was there any explicit support for bit like struct, e.g.: struct {
bool no_reply_expected : 1 { false };
bool no_auto_start : 1 { false };
bool allow_interactive_authorization : 1 { false };
std::uint8_t reserved : 5 { 0 };
}; Or would I just use glz::custom ? |
Beta Was this translation helpful? Give feedback.
Answered by
stephenberry
Jun 4, 2024
Replies: 1 comment
-
Bit fields are tricky because they don't support references or member function pointers. It's best to do bitwise logic in glz::custom. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jbbjarnason
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bit fields are tricky because they don't support references or member function pointers. It's best to do bitwise logic in glz::custom.