Boost logo

Boost :

Subject: Re: [boost] [type_erasure] Some issues
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2013-02-25 18:40:24


On 02/25/2013 11:30 AM, Fabio Fracassi wrote:
> On 2/25/13 6:13 PM, Steven Watanabe wrote:
> [snip]
>>> First I think I discovered a bug either in your lib or in clang(with
>>> libc++) when compiling one of the documentation examples in C++11 mode.
>> I haven't tested much with clang in C++11 mode.
>> I wasn't able to get libc++ working on Linux.
>> Are you using the latest version: r83101?
>> Also, exactly what version of clang are you
>> using? I'll take a look at this later today.
> Just updated to revision 83153 (boost sandbox), The problem remains.
> I am using
> Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
> <snip>

I've just committed a fix for this. I just
forgot to handle a case inside one clang
#ifdef branch.

> [snip]
>> The problem is the way name lookup works. It's clear that
>> draw can't be found in the template definition, since it
>> isn't declared until later on. Argument dependent lookup
>> usually works, but in this case, the only associated namespace
>> is std (from std::ostream) and draw is defined in the global
>> namespace. (Note that the built-in types have no associated
>> namespaces). BOOST_TYPE_ERASURE_FREE will have exactly
>> the same problem. The solution is add declarations of draw
>> for all builtin types /before/ the definition of drawable.
> Ok, this works, but makes it impossible to (reliably) define the concept
> in isolation.
> Quite a severe limitation. Is there any possibility to overcome this?

This isn't as bad as you might think.
It only applies to built in arithmetic
types and types in the standard library
of which there are a known fixed set.

In Christ,
Steven Watanabe

Boost list run by bdawes at, gregod at, cpdaniel at, john at