816 reputation
1511
bio website
location St. Petersburg, Russia
age
visits member for 3 years, 8 months
seen May 15 at 13:02

This page intentionally left blank.


Dec
7
comment C++ and system exceptions
@Patrick, this function works only for MSVC.
Dec
7
comment Best practice in setting return value (use else or?)
@Ryathal, I don't see any ambiguity there.
Dec
7
revised Best practice in setting return value (use else or?)
added 120 characters in body
Dec
7
comment C++ and system exceptions
@DeadMG, there is nothing fatal with null pointer dereference - it doesn't mean that data are corrupted, or another really bad thing happen.
Dec
7
comment C++ and system exceptions
There is no problem with MSVC, but I want to use g++ and other compilers, which doesn't support SEH on Windows.
Dec
7
revised C++ and system exceptions
added 929 characters in body
Dec
7
comment C++ and system exceptions
@delnan why my code? It can be third party dynamically linked code (plugin).
Dec
7
comment C++ and system exceptions
"Win32 exceptions are thrown in fatal cases from which you can't really recover" - it's incorrect. In VC++ all exceptions are implemented as system exceptions, and they definitely are non-fatal. Also, memory access violation can be non-fatal exceptions, nothing fatal will happen if replace if (p) with try block.
Dec
7
answered Best practice in setting return value (use else or?)
Dec
7
comment C++ and system exceptions
Why not to use system exceptions wherever it's possible, instead of not to use them at all?
Dec
7
asked C++ and system exceptions
Dec
1
comment Is it better to use preprocessor directive or if(constant) statement?
"Never USE preprocessor directives #ifdef to #endif crossing the scope or { ... }" it depends on IDE. If IDE recognizes inactive preprocessor blocks and collapses them or shows with different color, it's not confusing.
Dec
1
awarded  Editor
Dec
1
revised Elegant ways to handle if(if else) else
added 1114 characters in body
Dec
1
awarded  Commentator
Nov
30
awarded  Good Answer
Nov
30
awarded  Mortarboard
Nov
30
awarded  Nice Answer
Nov
30
comment Elegant ways to handle if(if else) else
@herby SomeTest can have the same semantics as file existence if SomeTest checks file type, for example checks that .gif is really GIF file.
Nov
30
awarded  Yearling