1
0
mirror of https://github.com/wqking/eventpp.git synced 2024-12-27 00:17:02 +08:00

Updated document according to previous code change

This commit is contained in:
wqking 2023-02-17 08:56:03 +08:00
parent 6f6ba44479
commit 0fe5dd65af
2 changed files with 4 additions and 4 deletions

View File

@ -92,10 +92,10 @@ EventQueue 可以拷贝、移动、赋值和移动赋值
```cpp ```cpp
template <typename ...A> template <typename ...A>
void enqueue(A ...args); void enqueue(A && ...args);
template <typename T, typename ...A> template <typename T, typename ...A>
void enqueue(T && first, A ...args); void enqueue(T && first, A && ...args);
``` ```
将一个事件加入事件队列。事件的类型包含在传给 `enqueue` 函数的实参中。 将一个事件加入事件队列。事件的类型包含在传给 `enqueue` 函数的实参中。

View File

@ -83,10 +83,10 @@ Note: the queued events are not copied, moved, assigned, or move assigned, only
```c++ ```c++
template <typename ...A> template <typename ...A>
void enqueue(A ...args); void enqueue(A && ...args);
template <typename T, typename ...A> template <typename T, typename ...A>
void enqueue(T && first, A ...args); void enqueue(T && first, A && ...args);
``` ```
Put an event into the event queue. The event type is deducted from the arguments of `enqueue`. Put an event into the event queue. The event type is deducted from the arguments of `enqueue`.
All copyable arguments are copied to internal data structure. All non-copyable but movable arguments are moved. All copyable arguments are copied to internal data structure. All non-copyable but movable arguments are moved.