При использовании конфигурации C++ LLVM-vs2014 в Visual Studio 2015 это статическое утверждение терпит неудачу. Утверждение не прерывается в clang ++, gcc или даже Visual C++. Атрибут thiscall
застревает в типе функции, даже если он больше не применим. Я опубликовал отчет об ошибке, но я хотел бы знать, есть ли способ принудительно удалить атрибут за это время. Можно удалить thiscall
?Атрибут компилятора, прикрепленный к типу функции - есть ли обходной путь для этой ошибки clang-cl?
#include <type_traits>
template<typename T>
struct remove_member_pointer;
template<typename T, typename U>
struct remove_member_pointer<T U::*> {
using type = T;
};
struct foo;
using input = void(foo::*)();
using expect = void();
using result = typename remove_member_pointer<input>::type;
//This static_assert fails because there is a
//compiler-generated attribute left behind, making
//the type of result actually `void() __attribute__((thiscall))`
static_assert(std::is_same<result, expect>{}, "");
int main() { return{}; }
Microsoft Visual Studio Community 2015 Версия 14.0.24720.00 Update 1