Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for Ayxan Haqverdiliâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Answer | — |
A: Multiple catches with almost the same code. One solution would be to catch a more generic base class, like `std::exception`. If all your exceptions derive from that, you should be safe. Another solution I like better is using destructors to do clean-up instead of lots of try-catches. The more clean up is done automatically by destructors, ... (more) |
— | about 3 years ago |
Question | — |
Is `uint8_t` always an alias for a character type if it exists? Is `uint8t` guaranteed to be a character type if it exists? Will using a `uint8t` to examine bytes of an object cause violation of the strict aliasing rule? Is the following legal code: ``` #include #include #include #include int main() { std::string str{"Hello"}; std::uint8t p = ... (more) |
— | about 3 years ago |