I would like to have a list as general as possible of examples of situations where the density of smooth objects into some "natural class" (the meaning of "natural" depending on the problem considered) fails, giving rise to interesting topological classifications. What comes to my mind are the following famous facts:

1) The condition for $C^\infty(\mathbb R^k, M^n)$ to be dense in the manifold-valued Sobolev spaces $W^{1,p}(R^k, M^n)$, is that the homotopy group $\pi_{[p]}(M)$ should be trivial.(Hang-Lin)

[this was kind of general, but gives the idea of what I'm looking for, maybe!]

2) A map $u$ in $W^{1,2}(B^3,S^2)$ is in the closure of $C^\infty(B^3, S^2)$ if and only if for any $2$-form $\omega$ on $S^2$ such that $\int_{S^2}\omega\neq 0$ one has $d(u^*\omega)=0$.(Bethuel-Coron-Demengel-Helein)

3) In $4$ dimensions, if the Yang-Mills functional is finite on a connection $A\in L^2(M^4)$, then the curvature $F_A$ of $A$ realizes an integral Chern class (i.e. the number $c_2(A):=1/(8\pi^2)\int_{M^4}Tr(F_A\wedge F_A)$ is an integer).(Uhlenbeck)

(Maybe I could also formulate the question differently, asking for mathematical situations having the "loss of differentiability" via "creation of new topology" analogous to the list above.)