Boost logo

Boost Users :

Subject: Re: [Boost-users] [range] can't use boost::any_range with RTTI disabled due to boost::polymorphic_downcast
From: Neil Groves (neil_at_[hidden])
Date: 2014-05-06 06:47:55


On Tue, May 6, 2014 at 11:42 AM, Adam Romanek <romanek.adam_at_[hidden]>wrote:

> Hi!
>
> I'd like to draw your attention to an issue with boost::any_range that
> prevents it from being used with RTTI disabled. The problem is that
> boost::any_range indirectly uses boost::polymorphic_downcast which in turn
> uses dynamic_cast. Note that the dynamic_cast is only used to ensure the
> requested cast is valid and it's done only in non-release builds. It would
> be great if the check was simply skipped in RTTI-disabled environments, as
> it is done in release builds. This would result in loss of safety that
> boost::polymorphic_downcast provides but the pieces that use it would at
> least compile in RTTI-disabled environments.
>
> Would it be possible to fix this problem?
>

I apologise for not thinking about this scenario. It shall fix this
immediately.

> If you wish I could create a ticket for this issue.
>

No need, I shall create the ticket directly.

>
> BTW, there's a typo in the documentation of boost::any_range [1]. It
> mentions boost::forward_pass_traversal_tag, which does not exist. It
> should rather be boost::forward_traversal_tag.
>

Noted.

>
> WBR,
> Adam Romanek
>

Thanks for pointing this out.

Regards,
Neil Groves



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net