mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-05-12 09:15:47 +00:00
Merge pull request #326 from oleksandr-pavlyk/fix-sfinae-incomplete
Fix GCC16 sfinae incomplete warnings. GCC16 started requiring that the type `T` used in `std::reference_wrapper<T>` is complete where using `-std=c++17`. Since NVBench has to forward declare some types in header files to break circular dependency, use of incomplete type breaks build due to use of `-Werror` flag due to `-Wsfinae-incomplete` warning emitted by GCC16. This commit replaced affected uses of `std::reference_wrapper<const nvbench::benchmark_base>` in state.cxx, and `std::reference_wrapper<nvbench::printer_base>` in benchmark_base.cxx with raw pointers.
This commit is contained in:
@@ -710,7 +710,7 @@ Returns True if configuration has a device
|
||||
|
||||
// method State.has_printers
|
||||
auto method_has_printers_impl = [](const nvbench::state &state) -> bool {
|
||||
return state.get_benchmark().get_printer().has_value();
|
||||
return state.get_benchmark().get_printer() != nullptr;
|
||||
};
|
||||
static constexpr const char *method_has_printers_doc = R"XXXX(
|
||||
Returns True if configuration has a printer"
|
||||
|
||||
Reference in New Issue
Block a user