The idea is to use a static member function to update the value of a static data member in the same class
template<typename K,typename U>
class Map{
private:
static pair<K,U> default_value;
public:
static void set_default(K& k,U& u){default_value=make_pair(k,u);}
};
int main(){
int a{8};
int b{9};
Map<int,int>::set_default(a,b);
return 0;
}
Here I get an error: undefined reference to Map<int,int>::default_value