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

missing include #232

Open
Carmelo908 opened this issue Jul 23, 2024 · 3 comments
Open

missing include #232

Carmelo908 opened this issue Jul 23, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Carmelo908
Copy link

Environment

toml++ version and/or commit hash:
3.4.0

Compiler:
g++ 13.1.0

C++ standard mode:
C++17

Target arch:
x64

Library configuration overrides:
None

Relevant compilation flags:
None

Describe the bug

I installed the library with vcpkg and added the toolchain file with CMake, then tried to compile my program and I got an error from the compiler:

.../vcpkg_installed/x64-linux/include/toml++/impl/date_time.hpp:337:17: error: ‘optional’ does not name a type

I went to the file and added "#include " at the top. it worked and I could compile

@Carmelo908 Carmelo908 added the bug Something isn't working label Jul 23, 2024
@marzer
Copy link
Owner

marzer commented Jul 30, 2024

This should not be the case if you are including the library 'normally'. 🤔 Can you show me the code that caused this, specifically, how were you #including toml++?

@Carmelo908
Copy link
Author

I used #include <toml++/toml.hpp> but I think maybe I'm suposed to just include in the same file

@marzer
Copy link
Owner

marzer commented Jul 31, 2024

No, you did the right thing. Looks like there's something amiss. I'll look into it, thanks 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants