私はclang
をDebian 8システムで使用しています。私は標準のC++ヘッダーを持っています。しかも、strcpy_s
を定義するヘッダーはありません。どうしてこれなの?システムのどこにstrcpy_sが存在しないのですか?
# grep -iRHI 'strcpy_s' /usr 2>/dev/null
/usr/include/x86_64-linux-gnu/bits/string2.h: ? __strcpy_small (dest, __strcpy_args (src), \
/usr/include/x86_64-linux-gnu/bits/string2.h:__STRING_INLINE char *__strcpy_small (char *, __uint16_t, __uint16_t,
/usr/include/x86_64-linux-gnu/bits/string2.h:__strcpy_small (char *__dest,
/usr/include/x86_64-linux-gnu/bits/string2.h:__STRING_INLINE char *__strcpy_small (char *, __STRING2_COPY_ARR2,
/usr/include/x86_64-linux-gnu/bits/string2.h:__strcpy_small (char *__dest,
/usr/src/broadcom-sta-6.30.223.248/src/include/bcmutils.h:#define bcm_strcpy_s(dst, noOfElements, src) strcpy((dst), (src))
私はupvoted。これをstrcpy_sテンプレートが必要なものに置き換えてください。インラインint strcpy_s(C * d、unsigned long dmax、const C * s){if(dmax <= 1 ||!d){if(!d ||!dmax)return C * = d + dmax-1;(d!= de ||(* d = C(0)))&&(* d = * s ); ++ d、++ s); return 0;} ' –
ありがとうございます。しかし、私はまだすべての他の機能が欠けている:( –