swesterfeld / liquidsfz

SFZ Sampler
Mozilla Public License 2.0
79 stars 12 forks source link

0.3.0 fails: implicit instantiation of undefined template 'std::vector<std::shared_ptr<LiquidSFZInternal::SFPool::Entry>>; cannot use type 'void' as a range #33

Closed yurivict closed 1 year ago

yurivict commented 1 year ago

clang-13 fails to compile 0.3.0:

sfpool.cc:182:24: error: implicit instantiation of undefined template 'std::vector<std::shared_ptr<LiquidSFZInternal::SFPool::Entry>>'
        vector<EntryP> close_candidates;
                       ^
/usr/include/c++/v1/iosfwd:251:28: note: template is declared here
class _LIBCPP_TEMPLATE_VIS vector;
                           ^
sfpool.cc:193:22: error: cannot use type 'void' as a range
      for (auto cc : close_candidates())
                     ^
sfpool.cc:203:39: error: subscripted value is not an array, pointer, or vector
          auto cc = close_candidates()[0];
                    ~~~~~~~~~~~~~~~~~~^~
2 warnings and 3 errors generated.

The file lib/sfpool.cc uses std::vector (and std::string) without including corresponding headers.

FreeBSD 13.1

swesterfeld commented 1 year ago

I agree about std::vector - std::string should be fine, because it is included by sfpool.hh. I'll add the include.