|
|
|
|
|
by twoodfin
4510 days ago
|
|
Yeah, they even admit that their macro compiles to identical code as the original RAII version. Where's the "overhead"? As a general rule, if your C++ compiler can statically see the layout of your structures and the implementation of your functions, it will produce code as efficient as inlining everything yourself. Sufficiently complex functions make the benefits of inlining a judgment call on the compiler's part, but for something as simple as an RAII scoped lock, the abstraction is free. |
|