Boost logo

Boost :

Subject: Re: [boost] Unittest capability for meta-programs feedback request
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-09-27 15:33:54


on Tue Sep 27 2011, Gennadiy Rozental <rogeeff-AT-gmail.com> wrote:

> Dave Abrahams <dave <at> boostpro.com> writes:
>
>> Sometimes, however, there's no compile-time bool to work with.
>>
>> If I am the author of std::pair and I write:
>>
>> // test that pair doesn't somehow convert unrelated types
>> // into values that can be used for construction
>> std::pair<int,int> x("foo", "bar");
>>
>> I expect that test to fail compilation. There's no useful assertion you
>> can do that will turn it into a runtime error.
>
> Yes. There are always some implied/implicit expectations. And I also
> do not see any way to make it into a testable concepts

My point is only this:

   Ben implied that he can turn every legitimate compile-fail test into
   a runtime test. He can't.

Unless you are still arguing that he can, we have nothing further to
argue about.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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