g++ error: specialization after instantiation for method with a function attribute For the C++ code below, I am getting