Since the variant_size is a struct type, “class” in the following definition should be changed to “struct”. template<class T> class variant_size<const T>; Change “class” to “struct” as follows: template<class T> struct variant_size<const T>; JP7