Related to Herb Sutter's "Guru of the Week" C++ programming challenges.
Questions tagged [gotw]
17 questions
1
vote
3 answers
How to fix this typical exception unsafe code?
According to GOTW #56, there is a potential classic memory leak and exception safety issues in the following code:
// In some header file:
void f( T1*, T2* );
// In some implementation file:
f( new T1, new T2 );
The reason is that when we new T1,…
![](../../users/profiles/1760345.webp)
taocp
- 22,020
- 6
- 46
- 60
0
votes
0 answers
Undefined reference to Pimpl destructor only with clang on Linux
Inspired by GoTW 101, I decided to try and apply the Pimpl idiom to a part of a library I'm working on using the pimpl wrapper described there.
However, when trying to compile, I get an undefined reference to the destructor of that Pimpl class. This…
![](../../users/profiles/1671042.webp)
dtruby
- 1,585
- 2
- 11
- 9