[fdo-dev] Where to put improvements?

Mateusz Loskot mateusz at loskot.net
Sat Dec 16 13:19:50 EST 2006


Here is another tech-note to discuss.
In the file


There is following piece of code:

#ifdef _DEBUG
    #ifdef _WIN32
#ifndef ASSERT
        #include <crtdbg.h>
        #define ASSERT  _ASSERT
    /// linux doesn't seem to have a standard assert mechanism?
        #define _ASSERT(x)
        #define ASSERT(x)

C++ compiler and C++ library on Linux does provide standard
diagnostics mechanism in form of assertions.
The standard assert mechanism in C++ is assert() macro
from the <cassert> header.
ASSERT, _ASSERT and _ASSERTE are Microsoft specific
extensions, as well as ATLASSERT and derivatives.

I believe it's not a good idea to disable assertions on Linux
with empty macros.

Mateusz Loskot

More information about the Fdo-internals mailing list