Here, the C++ compiler is too old. You need at least gcc 4.9.5 or so, I have been using gcc 6 without trouble for a long time now.
Best regards
Thomas
(Same problem/solution as here:
The problem about Loading a Pytorch Model in C++ 37 )