1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#define TROMPELOEIL_CUSTOM_RECURSIVE_MUTEX
#include <trompeloeil.hpp>
namespace trompeloeil {
std::unique_ptr<custom_recursive_mutex> create_custom_recursive_mutex() {
class custom : public custom_recursive_mutex {
void lock() override { mtx.lock(); }
void unlock() override { mtx.unlock(); }
private:
std::recursive_mutex mtx;
};
return std::unique_ptr<custom>(new custom);
}
} // namespace trompeloeil
class C {
public:
MAKE_MOCK0(func, int(void));
};
int main() {
C c;
}
|