Menu

#535 c++ template overloads of string functions missing

v1.0 (example)
open
nobody
None
5
2016-04-25
2016-04-25
No

https://msdn.microsoft.com/en-us/library/5dae5d43.aspx describes the following c++ only overloads:

template <size_t size>
errno_t strncpy_s(
   char (&strDest)[size],
   const char *strSource,
   size_t count
); // C++ only
template <size_t size>
errno_t _strncpy_s_l(
   char (&strDest)[size],
   const char *strSource,
   size_t count,
   _locale_t locale
); // C++ only
template <size_t size>
errno_t wcsncpy_s(
   wchar_t (&strDest)[size],
   const wchar_t *strSource,
   size_t count 
); // C++ only
template <size_t size>
errno_t _wcsncpy_s_l(
   wchar_t (&strDest)[size],
   const wchar_t *strSource,
   size_t count,
   _locale_t locale
); // C++ only
template <size_t size>
errno_t _mbsncpy_s(
   unsigned char (&strDest)[size],
   const unsigned char *strSource,
   size_t count 
); // C++ only
template <size_t size>
errno_t _mbsncpy_s_l(
   unsigned char (&strDest)[size],
   const unsigned char *strSource,
   size_t count,
   locale_t locale
); // C++ only

Of these, the following overloads are missing from mingw-w64:
* strncpy_s
* _strncpy_s_l
* wcsncpy_s
* _wcsncpy_s_l
* _mbsncpy_s
* _mbsncpy_s_l

See https://sourceforge.net/p/mingw-w64/code/HEAD/tree/trunk/mingw-w64-headers/crt/sec_api/string_s.h where the non-overloaded functions are defined.

Discussion


Log in to post a comment.