Make AttributesEnd a function to work around a C++11 deficiency