patrikhuber / eos

A lightweight 3D Morphable Face Model library in modern C++
Apache License 2.0
1.89k stars 596 forks source link

Error: ‘variant_size_v’ is not a member of ‘mpark’ #254

Closed qpoisson closed 3 years ago

qpoisson commented 5 years ago

I have noticed a closed issue #232 reporting the same error. However, I don't think the answer there had solved the issue. My environment is g++ (Ubuntu 7.1.0-10ubuntu1~16.04.york0) 7.1.0, which is a newer version than the author suggested in #232

patrikhuber commented 5 years ago

Hi, may I ask what the issue was in your case?

qpoisson commented 5 years ago

Hi, I encountered building error: " variant_size_v’ is not a member of ‘mpark’ ", when using C++14 . There is no error when using c++17.

patrikhuber commented 5 years ago

Thanks for the feedback. Hmm, there shouldn't be an error on gcc-7. I'll leave this open, it might be good to investigate this at some point.

And as you correctly noted, naturally, building with C++17 works just fine because then std::variant will be used instead.

patrikhuber commented 3 years ago

I've updated to the latest mpark::variant master branch version in bd590bfc2c0a81a09a0d9751c774740261c4679b. This is now released as eos v1.2.0/1.2.1. IIRC I saw in their commits that they fixed some compiler errors on earlier compilers (gcc 6/7 or so), so this might likely fix any issues that might have been present.

If there are still issues with mpark::variant when compiling eos in C++14 mode, please report here or in https://github.com/mpark/variant and we can always reopen this.