Closed jonas-schulze closed 1 year ago
Ubuntu hirsute has reached EOL, so I guess the CI failure is ok?
Regardning AppVeyor, I have no experience with Windoes, so don't know how to address the error message.
I added a member to Config
, which may be the reason, but I wonder why it built just fine on the (recent) Ubuntus.
'ankerl::nanobench::Config::Config(ankerl::nanobench::Config &&) noexcept': is not a special member function which can be defaulted
about const char* overloads, please add one, and the implementation can just call the std::string version then.
Given that there is a constructor std::string(char const*)
, this conversion should happen implicitly when calling context(std::string const&,...)
, shouldn't it? Passing a char const*
to it works just fine. I am not opposed to add the overloads, I just want to understand their benefits.
Some more observations:
Bench::name
std::string const&
to char const*
, e.g. Bench::unit
and Bench::render
(search for c_str
)Is that something that should be addressed?
I addressed all open issues. This is ready for review again. 🙂
Thanks a lot!
bench.context("name", "value")
{{context(name)}}
produce empty output (for that variable)throws an exceptionBench::run
; my use case assumes that all variables are needed for all runsbench.clearContext()
Unfortunately, I haven't been able to build and therefore check the docs I wrote.
Also, I saw that some methods are overloaded for
char const*
andstd::string const&
. ShouldBench::context
do the same? What aboutResult::context
?Do you think
context
is a feasible name? If not, how should these methods be called?