@@ -54,22 +54,42 @@ namespace llvm::sys::sandbox {
5454// / }
5555template <class FnTy > struct Interposed ;
5656
57- template <class RetTy , class ... ArgTy, bool NE>
58- struct Interposed <RetTy (*)(ArgTy...) noexcept (NE)> {
57+ template <class RetTy , class ... ArgTy> struct Interposed <RetTy (*)(ArgTy...)> {
5958 RetTy (*Fn)(ArgTy...);
6059
61- RetTy operator ()(ArgTy... Arg) const noexcept (NE) {
60+ RetTy operator ()(ArgTy... Arg) const {
6261 violationIfEnabled ();
6362 return Fn (std::forward<ArgTy>(Arg)...);
6463 }
6564};
6665
67- template <class RetTy , class ... ArgTy, bool NE>
68- struct Interposed <RetTy (*)(ArgTy..., ...) noexcept (NE)> {
66+ template <class RetTy , class ... ArgTy>
67+ struct Interposed <RetTy (*)(ArgTy...) noexcept > {
68+ RetTy (*Fn)(ArgTy...) noexcept ;
69+
70+ RetTy operator ()(ArgTy... Arg) const noexcept {
71+ violationIfEnabled ();
72+ return Fn (std::forward<ArgTy>(Arg)...);
73+ }
74+ };
75+
76+ template <class RetTy , class ... ArgTy>
77+ struct Interposed <RetTy (*)(ArgTy..., ...)> {
6978 RetTy (*Fn)(ArgTy..., ...);
7079
7180 template <class ... CVarArgTy>
72- RetTy operator ()(ArgTy... Arg, CVarArgTy... CVarArg) const noexcept (NE) {
81+ RetTy operator ()(ArgTy... Arg, CVarArgTy... CVarArg) const {
82+ violationIfEnabled ();
83+ return Fn (std::forward<ArgTy>(Arg)..., std::forward<CVarArgTy>(CVarArg)...);
84+ }
85+ };
86+
87+ template <class RetTy , class ... ArgTy>
88+ struct Interposed <RetTy (*)(ArgTy..., ...) noexcept > {
89+ RetTy (*Fn)(ArgTy..., ...) noexcept ;
90+
91+ template <class ... CVarArgTy>
92+ RetTy operator ()(ArgTy... Arg, CVarArgTy... CVarArg) const noexcept {
7393 violationIfEnabled ();
7494 return Fn (std::forward<ArgTy>(Arg)..., std::forward<CVarArgTy>(CVarArg)...);
7595 }
0 commit comments