Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: no template named 'optional' in namespace 'std' #143

Closed
yurivict opened this issue Apr 24, 2021 · 4 comments
Closed

error: no template named 'optional' in namespace 'std' #143

yurivict opened this issue Apr 24, 2021 · 4 comments
Labels
Milestone

Comments

@yurivict
Copy link

In file included from /disk-samsung/freebsd-ports/multimedia/lms/work/lms-3.25.0/src/libs/scrobbling/impl/internal/InternalScrobbler.cpp:20:
In file included from /disk-samsung/freebsd-ports/multimedia/lms/work/lms-3.25.0/src/libs/scrobbling/impl/internal/InternalScrobbler.hpp:22:
/disk-samsung/freebsd-ports/multimedia/lms/work/lms-3.25.0/src/libs/scrobbling/impl/IScrobbler.hpp:46:59: error: no template named 'optional' in namespace 'std'
                        virtual void listenFinished(const Listen& listen, std::optional<std::chrono::seconds> duration) = 0;
                                                                          ~~~~~^
In file included from /disk-samsung/freebsd-ports/multimedia/lms/work/lms-3.25.0/src/libs/scrobbling/impl/internal/InternalScrobbler.cpp:20:
/disk-samsung/freebsd-ports/multimedia/lms/work/lms-3.25.0/src/libs/scrobbling/impl/internal/InternalScrobbler.hpp:33:51: error: no template named 'optional' in namespace 'std'
                        void listenFinished(const Listen& listen, std::optional<std::chrono::seconds> duration) override;
                                                                  ~~~~~^
/disk-samsung/freebsd-ports/multimedia/lms/work/lms-3.25.0/src/libs/scrobbling/impl/internal/InternalScrobbler.hpp:26:8: warning: abstract class is marked 'final' [-Wabstract-final-class]
        class InternalScrobbler final : public IScrobbler
              ^
/disk-samsung/freebsd-ports/multimedia/lms/work/lms-3.25.0/src/libs/scrobbling/impl/IScrobbler.hpp:46:17: note: unimplemented pure virtual method 'listenFinished' in 'InternalScrobbler'
                        virtual void listenFinished(const Listen& listen, std::optional<std::chrono::seconds> duration) = 0;
                                     ^
/disk-samsung/freebsd-ports/multimedia/lms/work/lms-3.25.0/src/libs/scrobbling/impl/internal/InternalScrobbler.cpp:44:21: error: out-of-line definition of 'listenFinished' does not match any declaration in 'Scrobbling::InternalScrobbler'
        InternalScrobbler::listenFinished(const Listen& listen, std::optional<std::chrono::seconds> duration)
                           ^~~~~~~~~~~~~~
1 warning and 3 errors generated.

Did you forget to include <optional>?

Version 3.25.0

@epoupon
Copy link
Owner

epoupon commented Apr 25, 2021

Hi!
Thanks for reporting this, indeed looks like a missing include.
Which freebsd version do you use?

@epoupon epoupon added the bug label Apr 25, 2021
@yurivict
Copy link
Author

FreeBSD 12.2

@epoupon epoupon added this to the v3.25.1 milestone Apr 25, 2021
epoupon added a commit that referenced this issue Apr 25, 2021
@epoupon
Copy link
Owner

epoupon commented Apr 25, 2021

Could you by chance check if the b45b30d rev fixes the build?

@yurivict
Copy link
Author

This patch fixes the include problem.

@epoupon epoupon closed this as completed Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants