| 3 | #include <iostream> |
| 4 | |
| 5 | int main() |
| 6 | { |
| 7 | std::string s {"Hello world!\n"}; |
| 8 | |
| 9 | char a[20]; // storage for a C-style string |
| 10 | std::strcpy(a, std::data(s)); |
| 11 | // [s.data(), s.data() + s.size()] is guaranteed to be an NTBS since C++11 |
| 12 | |
| 13 | std::cout << a; |
| 14 | } |
nothing calls this directly
no outgoing calls
no test coverage detected