|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2005-06-24 10:13:53
"Gennadiy Rozental" <gennadiy.rozental_at_[hidden]> writes:
> "David Abrahams" <dave_at_[hidden]> wrote in message
> news:uekaropha.fsf_at_boost-consulting.com...
>> "Gennadiy Rozental" <gennadiy.rozental_at_[hidden]> writes:
>>
>>>>>> I just tried to compile something with the test library and two
>>>>>> translation units. Boom! It was this definition, which appears in
>>>>>> boost/test/impl/execution_monitor.ipp.
>>>>>
>>>>> I wonder which Boost.Test componenent were you using?
>>>>
>>>> Well, minimal test, and I now know it applies only to single TUs, but
>>>> the bug would apply to multiple TUs.
>>>
>>> Actually none of the Boost.Test inline components are supposed to be used
>>> for multiple testing modules (all supply main function()). So I do not
>>> think
>>> any fix is required.
>>
>> I'm sorry, but when I look at the documentation for execution_monitor,
>> I don't see "don't use this in multiple TUs." What am I missing?
>
> Nothing prevent you from using execution_monitor as a library with multiple
> TU. Inlined versions of Boost.Test components are intended just as a
> shortcuts to avoid linking in simple cases where header only solution is
> preferable.
Oh, I see. You are calling these ".ipp" files "inlined," but they
really have only non-inline functions and are not #included in any
header files the way, IME, .ipp files normally are (to separate
template implementations from their declarations).
> If you are using multiple TU based testing I don't think it
> should be considered as a "simple case" and linking with the library could
> be afforded.
Sure.
> If you believe it's important for inlined version of execution_monitor
> component (by itself) to be usable in multiple TU situation (which I don't
> really recommend - it brings a lot of dependencies with it especially on
> windows) I am open for discussion, but
>
> 1. It wouldn't help you with any of existing inlined Boost.Test components
> 2. It's more like a new feature than bug fix and could wait till after
> release.
No, I think I was just confused by the extensions on these files.
Sorry about that. You might want to consider whether there's a better
way to name them.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk