Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2004-10-16 15:24:53


JOAQUIN LOPEZ MU?Z wrote:
> AFAICS, the attached file should work (I've checked
> the workaround with other compilers), but BCB still
> doesn't like. Lacking the necessary BCB skills and
> tools, I'd appreciate if someone can take a look at
> it and, hopefully, turn it into a valid workaround
> for Borland. The relevant part is guarded by
> a "#if defined(__BORLANDC__)" directive.

Hi,

the patch makes tupe_test_bench.cpp compile successfully on BCB 5.5.1
and 5.6.4.

I have to add the disclaimer that it is an intuitive guess and may not
be a real solution. I gave it a try, that's all ;+).
The code looked good before I touched it and I have honestly no idea why
my adjustments make BCB behave again (for both changes)...

That this won't work:

  typedef typename boost::add_const<typename T::head_type> type;

but this

  typedef typename T::head_type const type;

is strange...
Is there something wrong with add_const on BCB ??

Regards,

Tobias

152a153,161
> template<int N, class T>
> struct element_impl<N, T, true /* IsConst */>
> {
> private:
> typedef typename T::tail_type Next;
> public:
> typedef typename element_impl<N-1, Next, true>::type const type;
> };
>
162,163c171
< public:
< typedef typename boost::add_const<typename T::head_type>::type type;

---
>   typedef typename T::head_type const type;

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