Reference to 'optional' is ambiguous

I want to use Pytorch in a project using openCV. I get similar issues as described in this topic.
![image|614x293]. I do need the namespace std, so I can not use the trick they used to solve the problem. I also get some addtional errors in from_blob.h uninitialized reference member in ‘class at::TensorMaker&’ [-fpermissive] and expected ‘)’ before ‘<’ token . These are all the errors I get when building:

I would try to solve the previous errors, especially the apparently missing ; in line 29, as the downstream failures might be caused by the initial error.

I have not changed anything in the file from_blob.h and line 29 does not seem to need a ;