  We give a necessary and sufficient condition on the cost function so that the
map solution of Monge's optimal transportation problem is continuous for
arbitrary smooth positive data. This condition was first introduced by Ma,
Trudinger and Wang \cite{MTW, TW} for a priori estimates of the corresponding
Monge-Amp\`ere equation. It is expressed by a so-called {\em cost-sectional
curvature} being non-negative. We show that when the cost function is the
squared distance of a Riemannian manifold, the cost-sectional curvature yields
the sectional curvature. As a consequence, if the manifold does not have
non-negative sectional curvature everywhere, the optimal transport map {\em can
not be continuous} for arbitrary smooth positive data. The non-negativity of
the cost-sectional curvature is shown to be equivalent to the connectedness of
the contact set between any cost-convex function (the proper generalization of
a convex function) and any of its supporting functions. When the cost-sectional
curvature is uniformly positive, we obtain that optimal maps are continuous or
H\"older continuous under quite weak assumptions on the data, compared to what
is needed in the Euclidean case. This case includes the reflector antenna
problem and the squared Riemannian distance on the sphere.
