I found that it's a link issue related to GTest macros which apparently generate this error when I try to test the optional result implicitely: