Implementing x² in C++

Many equations require to compute the square of some quantity x. Unfortunately, C++ does not provide an operator for exponentiation like Julia or Fortran. One can rely on two solutions: