There is a reason that NO major web application you name is written in C++, Gmail, Facebook, Google Docs, YouTube. There are major advantages to writing web applications in a higher level language and almost no advantages to writing them in C++.
I doubt that the parts of YouTube responsible for video-related heavy-lifting (transcoding, detecting copyright infringement, etc.) are written in a dynamic language like Python, Ruby or PHP or even a managed language like Java.
unless you are google and running at huge scale. then its C++ because they can hire a huge crowd of newbies from an elite university to maintain it and the cost divided across their huge server base is zero.