You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.
The following code should be considered correct (if you want to print the string "123"):
std::vector<int> z { 1, 2, 3 };
std::copy(z.begin(), z.end(),
std::ostream_iterator<int>(std::cout));
However, I get the following diagnostic
warning: passing a dangling pointer as argument [-Wlifetime]
std::ostream_iterator<int>(std::cout));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: it was never initialized here
std::ostream_iterator<int>(std::cout));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following code should be considered correct (if you want to print the string "123"):
However, I get the following diagnostic
See full repro case: https://godbolt.org/z/Rt3P6X
The text was updated successfully, but these errors were encountered: