Boost logo

Boost :

Subject: Re: [boost] [Boost.Test] Custom DataSet compiler error with no match for »operator^
From: Olaf Peter (ope-devel_at_[hidden])
Date: 2017-03-29 05:33:58


> On 03/28/2017 01:38 PM, Olaf Peter via Boost wrote:
>>
>> I run into a compile problem with [Boost.Test] DataSet. I can reduce it
>> by re-using the example provided by the docs:
>>
>> http://www.boost.org/doc/libs/1_62_0/libs/test/doc/html/boost_test/tests_organization/test_cases/test_case_generation/datasets.html#boost_test.tests_organization.test_cases.test_case_generation.datasets.example_descr
>>
>> <snip>
>> fibonacci_dataset() ^ fibonacci_dataset(),
>> <snip>
>>
>> error: no match for 'operator^' (operand types are
>> 'boost::unit_test::data::result_of::make<fibonacci_dataset>::type {aka
>> fibonacci_dataset}' and 'fibonacci_dataset')
>> fibonacci_dataset() ^ fibonacci_dataset(),
>>
>> My use case has to load input and expect files provides by two datasets.
>> How to fix it?
>>
>
> Bring the operator into scope:
>
> using bdata::monomorphic::operator^;
>
> This would normally be found by ADL, if either of the
> datasets is from Boost.Test.

Thank you Steven, this works (at last for fibonacci_dataset(), at home
probably too, but I can't test it locally).


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