deduce parallel call only on function signature and some const&

This commit is contained in:
Erik Frojdh
2019-01-11 12:33:11 +01:00
parent 0841df98d4
commit b46fb5e9c4
4 changed files with 43 additions and 39 deletions

View File

@ -141,8 +141,10 @@ class multiSlsDetector : public virtual slsDetectorDefs,
* Loop through the detectors serially
* and return a vector of results
*/
template <class CT>
struct NonDeduced { using type = CT; };
template <typename RT, typename... CT>
std::vector<RT> serialCall(RT (slsDetector::*somefunc)(CT...), CT... Args);
std::vector<RT> serialCall(RT (slsDetector::*somefunc)(CT...), typename NonDeduced<CT>::type... Args);
/**
* Loop through the detectors in parallel threads
@ -150,7 +152,7 @@ class multiSlsDetector : public virtual slsDetectorDefs,
*/
template <typename RT, typename... CT>
std::vector<RT> parallelCall(RT (slsDetector::*somefunc)(CT...),
CT... Args);
typename NonDeduced<CT>::type... Args);
/**
* If specific position, then provide result with that detector at position