Boost logo

Boost :

From: John C. Femiani (john.femiani_at_[hidden])
Date: 2008-07-22 11:23:39


Bruno Lalande wrote:
> Hi John,
>
> Thanks to have taken the time to test my code. You had the same result
> as Barend, who was able to reproduce the problem with GCC cygwin
> (3.4.4) but not MSVC. But the strange thing is that for me, the
> problem occurs for any compiler (MSVC or GCC). I really don't
> understand. Here is the list of compilers tested:
> - Barend: MSVC 8 Express (succeeds), cygwin GCC 3.4.4 (fails)
> - Me: MSVC 8 (fails), MSVC 9 Express (fails), GCC 4.2.3 (fails)
>
> I don't think there can be any functional difference between the
> express and normal version of the same MSVC so I don't understand.
> Could you precise the exact version you used?
>
> I've attached my MSVC compilation results to the mail.
>
> Bruno
The code in the email did not have headers, so I added

#include <iostream>
#include <boost/concept_check.hpp>
#include <boost/concept/requires.hpp>

Then I tested with
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86
(that is the professional version)
It worked.

As I said before, mingw-gcc 4.3.0 fails, but it looks like that is the norm for gcc.

I think boost is using the fact that the compiler should fail to define a nested enum when a concept assert fails, but that SFINAE should not consider that an error. It looks like it is doing this so that it can chain together many concept checks.

I think this must be a bug, so I added a ticket http://svn.boost.org/trac/boost/ticket/2137.
The exact sourcecode I used is attached.

It looks to me like in boost/concept_check/where_fail.cpp they are not testing *why* the concept check fails.
I think in g++ it should be saying something like

where_fail.cpp:11: error: no matching function for call to 'sort(std::_List_iterator<int>, std::_List_iterator<int>)'

But instead I TONS of other errors.


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