Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-06-17 09:42:18

Phil Richards <news_at_[hidden]> writes:

> In a moment of outstanding boredom, I ran the regression tests for
> the latest gcc 4.0.1 snapshot under Linux. Looking through the
> fails in the HTML report I noticed that boost::implicit_cast was
> shown as failing test implicit_cast_fail.
> The output of the test is:
> ../libs/conversion/test/implicit_cast_fail.cpp: In function 'int test_main(int, char**)':
> ../libs/conversion/test/implicit_cast_fail.cpp:21: error: conversion from 'const char*' to non-scalar type 'foo' requested
> ../libs/conversion/test/implicit_cast_fail.cpp:21: warning: unused variable 'x'
> ../libs/conversion/test/implicit_cast_fail.cpp:22: warning: control reaches end of non-void function
> (failed-as-expected) ../bin/boost/libs/conversion/test/implicit_cast_fail.test/gcc/debug/implicit_cast_fail.o

That looks like it's passing the test!

> Given that (as far as my understanding of the test suite goes)
> compilation failure is the expected behaviour, why is this highlighted
> as a test failure in the HTML report?
> Anyway, off I trundle to find out what it is supposed to do.
> Unfortunately, there doesn't appear to be any documentation for
> "implicit_cast". So I look in the header file and find:
> // implementation originally suggested by C. Green in
> //
> And dutifully follow the link to find an article by Peter Dimov
> about "Perfect Forwarding".

Oh, crud, I guess the links changed.

> I apologise if I'm being dumb and missing something obvious,
> but something looks a little screwy... explains part
of it. The rest of the history is in the thread at Follow the replies.

Patches welcome, as always!

Dave Abrahams
Boost Consulting

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