patrikhuber / eos

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

<optional> header #176

Closed bigdimboom closed 6 years ago

bigdimboom commented 6 years ago

This library uses the "optional" header which is a c++17 header. And I'm using visual studio 2015. Is there a workaround? e.g. LandmarkMapper.hpp Meaning it only supports c++ 17 no more C++11 and 14.

patrikhuber commented 6 years ago

Hi, You should be able to replace it with https://github.com/akrzemi1/Optional relatively easily, it's a drop-in replacement. Actually I've planned to do this for a while (but in an a bit more integrated/flexible way) but haven't had the time yet. I do have it on my todo-list for the few weeks or so though but if you just want to replace it in a "dirty" way it should be quite easy :-)

caozhenxiang-kouji commented 6 years ago

How to solve this problem on Ubuntu 16.04?

patrikhuber commented 6 years ago

@sbyNiceBlowJob: Just install a recent compiler (e.g. gcc-7), as described in the readme. It's easy to google:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-7 g++-7

caozhenxiang-kouji commented 6 years ago

Can your model produce the texture as well? And do you have a model that produce meshes with lower resolution ,for example, around 1000 vertices?

patrikhuber commented 6 years ago

@sbyNiceBlowJob Please stay on topic in this issue. Please have a look at our VISAPP paper (linked in the readme), and more information about the SFM can be found here (also linked in the readme).

caozhenxiang-kouji commented 6 years ago

Oh, I'm sorry. Thanks a lot!

patrikhuber commented 6 years ago

I am currently working on this in the cpp14-optional branch :-) Should hopefully be done in a day or so. Will keep this issue updated.

patrikhuber commented 6 years ago

eos now transparently uses akrzemi1/Optional on Xcode, where there is no <optional> yet. This should help other people too who want to try to compile eos with another compiler that does not have <optional>. The changes are now all merged into master.

As always I strongly recommend updating your compiler instead. :-)