Boost logo

Boost :

From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2002-07-25 10:06:18


> > Let say some algorithm like find_if is failing (not
> > compilation error but static assert), i.e. it's result is
> > different them you expected. Would not you be interested to
> know what type was computed in fact?

> I can query that without making the test run-time:

> typedef mpl::list_c<int,1,0,5,1,7,5,0,5> values;
> typedef mpl::find< values, mpl::integral_c<int,7> >::type iter;

> BOOST_MPL_AUX_DEBUG_PRINT(iter::type);

Does not seems very convinient cause you need to change the code every time
While would you have a statement like
BOOST_CHECK_IS_SAME it would print to you "value" n case of failure
automatically.

> > And how are you gonna keep track of tests that are passing,
> > supposed to fail and so on.

> All tests should pass.
The problems with buggy compilers may question this statement.

> This list of "what if" could be prolonged. Is there specific
> reason why you want to keep tests compile-time?

> Yes - it would make my life more painful :). In particular, I would lose
an
> ability to test what I am currently working on from the IDE (or at least
it
> would require non-trivial efforts to setup the whole thing).
No it does not. It very simple to setup MS IDE (is it what you are talking
about?) so that you will jump with F4 through the list of runtime errors.

> Aleksey

Gennadiy.


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