From 964a9d70f9c2a50c4d30c9f8e3a40eb083ffd236 Mon Sep 17 00:00:00 2001 From: Gonzalo Martinez Lema Date: Thu, 14 Dec 2023 21:23:56 +0200 Subject: [PATCH] Add templated overload --- nain4/src/n4-shape.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nain4/src/n4-shape.hh b/nain4/src/n4-shape.hh index 54949604..396d933f 100644 --- a/nain4/src/n4-shape.hh +++ b/nain4/src/n4-shape.hh @@ -44,6 +44,8 @@ struct shape { shape& sensitive(G4SensDet* s) { sd = s; return *this; } shape& vis(G4VisAttributes v) { va = v; return *this; } shape& vis(G4VisAttributes* v) { return vis(*v); } + template + shape& vis(Args&&... args) { return vis(n4::vis_attributes{std::forward(args)...}); } virtual ~shape() {} // Boolean operations