I have just downloaded LO 5.4, but it doesn't open a file containing the C++ draft.

While trying to open the C++ draft N4659 (11,461 KB) in LO 5.4, I get the error: “bad allocation”. This is my first trial using this program. I’m on a Windows 10.

This operation takes a lot of memory. My LO x64 took 3,2 GB on import (and quite a wait). That would be impossible e.g. using 32-bit LO on Windows (from experience, that combination makes LO crash after ~1.7 GB). After import, memory usage dropped to 1.1 GB.
Are you sure you are using 64-bit version of LO?

I installed the 64-bit version to no avail. The document N4659 didn’t open. After several minutes I cancelled the program

I told you that I had to wait. I started to open it just 5 minutes after you posted your question, and posted my answer as soon as it finished. So, it took ~20 minutes.

It’s also interesting why do you need to open a PDF with LO. There’s no problem in that, of course; but just curious what 1622 pages open in Draw may be useful for.