fmang / opustags

Ogg Opus tags editor
BSD 3-Clause "New" or "Revised" License
82 stars 11 forks source link

need to explicitely include <optional> #33

Closed omar-polo closed 4 years ago

omar-polo commented 4 years ago

Hi,

I am not able to build opustags as it fails during compilation because of

In file included from /home/op/build/opustags/src/cli.cc:10:
/home/op/build/opustags/src/opustags.h:390:7: error: no template named
      'optional' in namespace 'std'
        std::optional<std::string> path_out;
        ~~~~~^
...

I am not proficient in C++, so I'm not able to properly fix this, but if I add an explicit include in opustags, it builds fine.

Index: src/opustags.h
--- src/opustags.h.orig
+++ src/opustags.h
@@ -31,6 +31,7 @@
 #include <functional>
 #include <list>
 #include <memory>
+#include <optional>
 #include <string>
 #include <vector>

I'm using clang 10.0.1 on OpenBSD. Also, FYI to build here it also needs the target_link_libraries to iconv.

I've just fixed a bunch of tags on various ogg files, thanks for developing this :)

fmang commented 4 years ago

Thanks for the report! I’ve create a pull request that you can test for the iconv issue.