www.digitalmars.com         C & C++   DMDScript  

c++ - New dm.hpp for boosters, 4 bug reports, 1 question

reply dan <dan_member pathlink.com> writes:
For those using the boost diff file for DMC compatibility, the new dm.hpp file
should be changed to the following:

--------------------------------------------
//  Digital Mars C++ compiler setup:
#define BOOST_COMPILER __DMC_VERSION_STRING__
#define BOOST_HAS_LONG_LONG
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
#define NEEDS_PASTING_TOKEN_FOR_JUXTAPOSING
#define BOOST_NO_OPERATORS_IN_NAMESPACE
#define BOOST_NO_SFINAE
#define BOOST_NO_TEMPLATE_TEMPLATES
#define BOOST_NO_USING_TEMPLATE
#define BOOST_USE_INT_3_INSTEAD_OF_ASSERT
#pragma once
// check for exception handling support:
#ifndef _CPPUNWIND

#endif
#if (__DMC__ < 0x833)


report the results"

#endif
--------------------------------------------------

.or just wait for boost 1.31; should be out in no time.

--------------------------------------------------

Bug report 1:

struct base< Derived >
{
struct inner {};
};
template< typename <T> >
struct derived : base< derived<T> >
{
inner x; //<- should flag error
void f()
{
inner y; //<-should flag error
}
};
.as inner is a dependent type requiring 'typename'.  Won't compile under
Comeau's latest Beta, but it compiles without warnings under DM.

--------------------------------------------------

Bug report 2:

struct base {};
struct derived : base {};
derived make_derived_temporary(){ return derived; }
void f()
{
base const & temp_ref = make_derived_temporary();
..statements...
} <- the temporary should last till here,
but in DM it is destroyed immediately upon assignment to the reference.

--------------------------------------------------

Bug report 3:

IDDE lockup, reasons unknown, but occurs while Parsing imports.

--------------------------------------------------

Bug report 4:

In IDDE, assert() terminates the app; I'm using the following, so that execution
stops at the line of the assertion:

dmassert.hpp

#ifdef _DEBUG




#else

#endif

--------------------------------------------------

Question: Why doesn't DM automatically define _DEBUG in debug mode? I always
have to tell it to define it. Missing something?

Cheers!
Jan 09 2004
next sibling parent dan <dan_member pathlink.com> writes:
--------------------------------------------------

Bug report 3:

IDDE lockup, reasons unknown, but occurs while Parsing imports.

--------------------------------------------------
Update: It was caused by an #include "..\" Cheers!
Jan 09 2004
prev sibling parent reply "Walter" <walter digitalmars.com> writes:
Thanks, Dan, I'll check 'em out.

 Question: Why doesn't DM automatically define _DEBUG in debug mode? I
always
 have to tell it to define it. Missing something?
It automatically defines DEBUG when you compile with -D. See www.digitalmars.com/ctg/predefined.html
Jan 10 2004
parent reply "Matthew" <matthew.hat stlsoft.dot.org> writes:
"Walter" <walter digitalmars.com> wrote in message
news:btqlgq$1dvd$1 digitaldaemon.com...
 Thanks, Dan, I'll check 'em out.

 Question: Why doesn't DM automatically define _DEBUG in debug mode? I
always
 have to tell it to define it. Missing something?
It automatically defines DEBUG when you compile with -D. See www.digitalmars.com/ctg/predefined.html
Is that DEBUG or _DEBUG?
Jan 10 2004
parent "Walter" <walter digitalmars.com> writes:
"Matthew" <matthew.hat stlsoft.dot.org> wrote in message
news:btqpec$1kpd$1 digitaldaemon.com...
 "Walter" <walter digitalmars.com> wrote in message
 news:btqlgq$1dvd$1 digitaldaemon.com...
 Thanks, Dan, I'll check 'em out.

 Question: Why doesn't DM automatically define _DEBUG in debug mode? I
always
 have to tell it to define it. Missing something?
It automatically defines DEBUG when you compile with -D. See www.digitalmars.com/ctg/predefined.html
Is that DEBUG or _DEBUG?
DEBUG
Jan 11 2004