When can't a real definite integral be evaluated using contour integration?

Some older complex analysis textbooks state that $\displaystyle \int_{0}^{\infty}e^{-x^{2}} \ dx$ can't be evaluated using contour integration.

But that's now known not to be true, which makes me wonder if you can ever definitively state that a particular real definite integral can't be evaluated using contour integration.

Edit: (t.b.) a famous instance of the above claim is in Watson, Complex Integration and Cauchy's theorem (1914), page 79:

-
Could you add references for your statements? E.g., which older complex analysis textbooks do state this where? –  user20266 Mar 31 '12 at 19:29
@Thomas: see edit. –  t.b. Mar 31 '12 at 20:02
How about considering an integral on the real line that is so bizarre that it cannot be a profile of some holomorphic function? –  sos440 Mar 31 '12 at 22:55
While I find this question very interesting, I have to note that the formulation in the quoted text is quite prudent. It does circumvent the statement that the example cannot be evaluated. –  Phira Apr 26 '12 at 13:36
@Yrogirg: (late answer...) quite simply by taking as contour the first quarter of the circle : $\displaystyle \int_0^1 x^2\,dx+\int_0^{\frac {\pi}2} e^{2i\phi}ie^{i\phi}\,d\phi +\int_1^0 (ix)^2 i\,dx=0\$ that becomes $\ \displaystyle (1+i)\int_0^1 x^2\,dx=\frac {1+i}3$. –  Raymond Manzoni Jul 6 '12 at 8:36