Email Archive: spirit-general (read-only)

[Spirit-general] file_iterator needs workaround for VC8
From: MB <mb2act@ya...> - 2006-01-31 07:11
Hi,

I found my post that had been sent to a wrong mailing-list.
Well, please look at:


Under VC8 Express Edition:

#include <functional>
#include <boost/spirit/iterator/file_iterator.hpp> // greeting

namespace your {
struct plus { };
}

namespace my {
using namespace your;
struct A : plus { }; // error C2872: 'plus' : ambiguous symbol
}


I don't know what happens, but 'using namespace std;' at
<iterator/impl/file_iterator.ipp:line41> does something bad.


Simplified Code:

namespace standard {
struct plus { };
}

// almost like 'using namespace standard' under vc8?
namespace fileiter_impl {
// 'using-directive' here
using namespace standard;

// 'class template' here
template< typename CharT >
class std_file_iterator { };
}

namespace your {
struct plus { };
}

namespace my {
using namespace your;
struct A : plus { }; // error C2872: 'plus' : ambiguous symbol
}


Regards,
MB
p-stade.sourceforge.net

 

Thread View

Thread Author Date
[Spirit-general] file_iterator needs workaround for VC8 MB <mb2act@ya...>
From: Martin Wille <mw8329@ya...> - 2006-01-31 07:46
MB wrote:

> Well, please look at:
>
>
> Under VC8 Express Edition:

Confirmed, this is a VC8 bug.


I'll modify file_iterator tests in order to make the bug visible in the
regression tests and will try to add a workaround to file_iterator.ipp


Regards,
m
Send instant messages to your online friends http://au.messenger.yahoo.com

From: MB <mb2act@ya...> - 2006-01-31 12:29
Martin Wille wrote:
> MB wrote:
>
>
>>Well, please look at:
>>
>>
>>Under VC8 Express Edition:
>
>
> Confirmed, this is a VC8 bug.
>
>
> I'll modify file_iterator tests in order to make the bug visible in the
> regression tests and will try to add a workaround to file_iterator.ipp

Excellent.
I wonder why VC8 contains such terrible bug. (VC7.1 doesn't)
We can no longer use using-directive in headers...


Regards,
MB

From: Martin Wille <mw8329@ya...> - 2006-01-31 15:36
MB wrote:

> I wonder why VC8 contains such terrible bug. (VC7.1 doesn't)

The results from regression testing seem to indicate the bug was also
present in 7.1.

See http://tinyurl.com/bmtp4 [1]


Regards,
m


[1]
http://engineering.meta-comm.com/boost-regression/CVS-HEAD/developer/output/RudbekAssociates-bin-boost-libs-spirit-test-file_iterator_tests-test-vc-7_1-debug-threading-multi.html

(the URL will only work as long as there's no workaround for the bug)
Send instant messages to your online friends http://au.messenger.yahoo.com

From: MB <mb2act@ya...> - 2006-01-31 16:44
Martin Wille wrote:
> MB wrote:
>
>
>>I wonder why VC8 contains such terrible bug. (VC7.1 doesn't)
>
>
> The results from regression testing seem to indicate the bug was also
> present in 7.1.

Right. I overlooked it.
I gave up searching condition that VC7.1 did "not" fail. :-)
I should also note a current user workaround:

namespace my {
using namespace your;

using your::plus; // using-declaration

struct A : plus { }; // fine
}


Regards,
MB

From: Martin Wille <mw8329@ya...> - 2006-02-01 05:31
MB wrote:

> I should also note a current user workaround:
>
> namespace my {
> using namespace your;
>
> using your::plus; // using-declaration
>
> struct A : plus { }; // fine
> }

The using directive is now at function scope. The changes have been
committed to the Boost CVS HEAD, regression tests don't show any problems.


Regards,
m
Send instant messages to your online friends http://au.messenger.yahoo.com

From: MB <mb2act@ya...> - 2006-02-01 07:15
Martin Wille wrote:
> MB wrote:
>
>
>>I should also note a current user workaround:
>>
>> namespace my {
>> using namespace your;
>>
>> using your::plus; // using-declaration
>>
>> struct A : plus { }; // fine
>> }
>
>
> The using directive is now at function scope. The changes have been
> committed to the Boost CVS HEAD, regression tests don't show any problems.

Great.
IMO, file_iterator is much prettier than streams.
Thank you very much for your time!

Regards,
MB