non-member function cannot have cv-qualifier

Your desire not to modify t is expressed in const T& t. The ending const specifies that you will not modify any member variable of the class abs belongs to.

Since there is no class where this function belongs to, you get an error.

Leave a Comment