-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Summary
I think the copy constructor and the assignment operator of the "BinarySemaphore" class have the wrong class name, when using a C++ version before C++11. I have also noticed, that the code example for the class uses "Semaphore" as the type.
Current Code
#if __cplusplus < 201101L
Semaphore(Semaphore const&); ///< We are not copyable.
void operator =(Semaphore const&); ///< We are not assignable.
#else
BinarySemaphore(BinarySemaphore const&) = delete; ///< We are not copyable.
void operator =(BinarySemaphore const&) = delete; ///< We are not assignable.
#endif // __cplusplus/**
* @brief Binary Semaphore Wrapper.
*
* Example Usage:
* @code
* Semaphore sema("MySema");
*
* // In some task
* sema.give();
*Expected Code
#if __cplusplus < 201101L
BinarySemaphore(BinarySemaphore const&); ///< We are not copyable.
void operator =(BinarySemaphore const&); ///< We are not assignable.
#else
BinarySemaphore(BinarySemaphore const&) = delete; ///< We are not copyable.
void operator =(BinarySemaphore const&) = delete; ///< We are not assignable.
#endif // __cplusplus/**
* @brief Binary Semaphore Wrapper.
*
* Example Usage:
* @code
* BinarySemaphore sema("MySema");
*
* // In some task
* sema.give();
*Metadata
Metadata
Assignees
Labels
No labels