boostorg / boostorg/fiber

Asio integration: link error in yield.hpp included in different cpp

オープン
#263 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
510
フォーク
123
PR マージ指標
30日以内にマージされた PR はありません

説明

In the file `examples/asio/yield.hpp` there is the line
```
thread_local yield_t yield{};
```
So if this yield.hpp included in two different cpp files then there will be link issue.

If existing code will be changed with following then issue is solved.
```
inline yield_t& this_yield() {
thread_local yield_t yield;
return yield;
}
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。