libnonius / nonius

A C++ micro-benchmarking framework
https://nonius.io
Creative Commons Zero v1.0 Universal
359 stars 47 forks source link

Compile fix for MSVC2015 #72

Closed bitshifter closed 8 years ago

bitshifter commented 8 years ago

Fixes the following error:

include\nonius/execution_plan.h++(49): error C2440: '<function-style-cast>': cannot convert from 'nonius::chronometer' to 'nonius::benchmark'
include\nonius/execution_plan.h++(49): note: No constructor could take the source type, or constructor overload resolution was ambiguous
test\faster_than_clock.c++(33): note: see reference to function template instantiation 'std::vector<std::chrono::duration<double,std::nano>,std::allocator<_Ty>> nonius::execution_plan<nonius::counting_clock::duration>::run<nonius::counting_clock>(nonius::configuration,nonius::environment<std::chrono::duration<double,std::nano>>) const' being compiled
        with
        [
            _Ty=std::chrono::duration<double,std::nano>
        ]
test\faster_than_clock.c++(33): note: see reference to function template instantiation 'std::vector<std::chrono::duration<double,std::nano>,std::allocator<_Ty>> nonius::execution_plan<nonius::counting_clock::duration>::run<nonius::counting_clock>(nonius::configuration,nonius::environment<std::chrono::duration<double,std::nano>>) const' being compiled
        with
        [
            _Ty=std::chrono::duration<double,std::nano>
        ]