Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shared_ptrの配列対応 #24

Open
na-trium-144 opened this issue Dec 28, 2024 · 0 comments
Open

shared_ptrの配列対応 #24

na-trium-144 opened this issue Dec 28, 2024 · 0 comments

Comments

@na-trium-144
Copy link
Owner

  • C++17より前では、型は存在するがdeleterを手動で渡さない限り機能しない
  • C++17では、new int[10] とかを渡せばできる。
    • operator[]が使えるようになる
    • element_typeの型がちがう
    • U[N] と U[] の両方に用意されている
  • C++20ではmake_shared<int[]>(n)ができる? (手元ではできない)
  • unique_ptrならC++11からU[]がある
    • U[N]の特殊化はなさそう
@na-trium-144 na-trium-144 converted this from a draft issue Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant