Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

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 Angew‭

Type On... Excerpt Status Date
Edit Post #291429 Initial revision about 1 month ago
Answer A: Can I conditionally include class members without using #ifdef?
There's nothing as elegant as `if constexpr`, unfortunately. However, it is possible to achieve the practical effects (member functions and data only present conditionally). Start by creating a class template that will encapsulate all the `fooBar`-specific code and data. Use the Curiously Recurrin...
(more)
about 1 month ago
Comment Post #291371 The good programmer has as many tools in their toolbox as they can get, and use the best one for the job, evaluating simplicity, performance, maintainability, reliability, etc. all jointly. Shoehorning everything into `std::vector` is just as bad as using a `std::map` whose maximum size will never ex...
(more)
about 1 month ago
Edit Post #291371 Initial revision about 1 month ago
Answer A: When to use custom iterators versus pointers
> However, I suspect that most iterators can be written as iterating over an array. From my experience, I wouldn't expect this to be the case. From the standard library containers, only `std::vector` and `std::array` can work with iterators implemented as pointers. All the other containers have...
(more)
about 1 month ago
Edit Post #280674 Post edited:
Add standard quotes
over 3 years ago
Edit Post #280674 Initial revision over 3 years ago
Answer A: Destroy std::mutex referenced but not owned by std::unique_lock?
No, such an operation is not safe. The documentation of `std::uniquelock` in the standard states that it's UB for the mutex do be destroyed while the lock still has a pointer to it. However, there is a way to dissociate the mutex from the lock: calling `release` on the lock. That resets the lock's...
(more)
over 3 years ago