Boost logo

Boost :

From: Dan W. (danw_at_[hidden])
Date: 2004-01-09 20:06:51


Daniel Wallin wrote:
>>>> derived make_temp_derived(){ return derived; }
>>>> //scope..
>>>> {
>>>> base const & b = make_temp_derived();
>>>> ...
>>>> } <- the created temporary should last till here?
>>
>> With my compiler, it gets destroyed immediately, so I made an
>> implementation that simply instantiates the variable.
>
> Which compiler is that? IHMO, there's only so much you should do to
> handle non-conforming compilers; if a compiler fails to handle a thing
> as simple as this it should be thrown out the window.

Doesn't look simple to me, I scratch my head real hard when I saw your
code doing that; but then agin I'm a short man among giants here :)

The compiler is still a baby, I wouldn't throw it with the bath water;
it's Digital Mars, version 8.38. Quite compliant, actually; only took
two boost defines to compile an MPL sample program. Admitedly, the list
of needed defines has been growing...

---------------------------------------------------
//file: DM.HPP -- Digital Mars C++ compiler setup:
#define BOOST_COMPILER __DMC_VERSION_STRING__

#define BOOST_HAS_LONG_LONG
#define BOOST_HAS_DESIGN_BY_CONTRACT
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
#define BOOST_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
# define BOOST_NO_EXCEPTIONS
#endif

#if (__DMC__ < 0x833)
# if defined(BOOST_ASSERT_CONFIG)
# error "Unknown compiler version - please run the configure tests
and report the results"
# endif
#endif
---------------------------------------------------

...but it's not definitive yet.
BTW, do you think the invariants code is okay now?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk