Why clang bundled with 10-RELEASE doesn't define

看板FB_stable作者時間12年前 (2014/02/08 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
Hello, freebsd-stable. Why __has_feature(cxx_nulptr) doesn't work on system compiler? nullptr itself works! Here is sample program: ============================= test.cxx #include <memory> #ifndef __has_feature #warning "Doesn't support for __has_feature at all" #define __has_feature(x) 0 #endif #if __has_feature(cxx_nullptr) #warning "Has nullptr" #else #warning "Doesn't have nullptr" #endif int main(int argn, char *argv[]) { void *v = nullptr; return 0; } ====================================== > c++ --version FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 Target: x86_64-unknown-freebsd10.0 Thread model: posix > c++ test.cxx test.cxx:11:2: warning: "Doesn't have nullptr" [-W#warnings] #warning "Doesn't have nullptr" ^ 1 warning generated. > -- // Black Lion AKA Lev Serebryakov <lev@FreeBSD.org> _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
文章代碼(AID): #1IzHzVFz (FB_stable)
文章代碼(AID): #1IzHzVFz (FB_stable)