Review fix: make nvbenhch_run_error constructable

Allow `throw nvbench_run_error("Msg");` to compile.

Add comment around definition of nvbench_run_error
This commit is contained in:
Oleksandr Pavlyk
2025-08-04 09:40:17 -05:00
parent 4fc628c4d7
commit 40a2337a6b

View File

@@ -100,8 +100,13 @@ private:
std::shared_ptr<py::object> m_fn;
};
class nvbench_run_error : std::runtime_error
{};
// Use struct to ensure public inheritance
struct nvbench_run_error : std::runtime_error
{
// ask compiler to generate all constructor signatures
// that are defined for the base class
using std::runtime_error::runtime_error;
};
py::handle benchmark_exc{};
class GlobalBenchmarkRegistry