We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b65adf8 commit a554fc6Copy full SHA for a554fc6
c10/util/Synchronized.h
@@ -42,9 +42,9 @@ class Synchronized final {
42
* provided callback safely.
43
*/
44
template <typename CB>
45
- typename std::result_of<CB(T&)>::type withLock(CB cb) {
+ void withLock(CB cb) {
46
std::lock_guard<std::mutex> guard(this->mutex_);
47
- return cb(this->data_);
+ cb(this->data_);
48
}
49
50
/**
@@ -53,9 +53,9 @@ class Synchronized final {
53
* the provided callback safely.
54
55
56
- typename std::result_of<CB(T const&)>::type withLock(CB cb) const {
+ void withLock(CB cb) const {
57
58
59
60
};
61
} // end namespace c10
0 commit comments