https://llvm.org/bugs/show_bug.cgi?id=27402
Bug ID: 27402 Summary: __restrict qualifier not recognized in template specialization Product: clang Version: 3.8 Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: bkietz.bor...@gmail.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified I tried to write a trait class for detecting `__restrict` qualification on references/pointers: ``` template <typename T> struct is_restrict : std::false_type {}; template <typename T> struct is_restrict<T * __restrict> : std::true_type {}; template <typename T> struct is_restrict<T & __restrict> : std::true_type {}; template <typename T> struct is_restrict<T && __restrict> : std::true_type {}; static_assert(is_restrict<int & __restrict>::value, "int & __restrict"); ``` This static_assert passed in GCC and MSVC, but failed in Clang. The specialization for restrict pointer functioned as expected. http://melpon.org/wandbox/permlink/2BEkXcmEE0MmOhwl -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs