動作としては

* 渡された smart ptr が pool 中に登録されている文字列と全く同じアドレスを指すものなら、そのまま返す
* 同じ文字列が登録されているがアドレスが違うなら、プールで持っている文字列のアドレスを参照する smart ptr を返す
* 未登録の文字列なら登録して、プールで持っている文字列のアドレスを参照する smart ptr を返す

という感じ

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.cardina1.red/users/lo48576/statuses/114686245483162151 on your instance and quote it. (Note that quoting is not supported in Mastodon.)