Skip to content

Conversation

SGauvin
Copy link

@SGauvin SGauvin commented Aug 19, 2025

date_time.hpp was not including std_optional.hpp directly. It probably got it transitively from other files including it directly. This caused clangd to complain at every #include <toml++/toml.hpp>

What does this change do?

Adds a missing include

Is it related to an exisiting bug report or feature request?

No

Pre-merge checklist

  • [x ] I've read CONTRIBUTING.md
  • [x ] I've rebased my changes against the current HEAD of origin/master (if necessary)
  • I've added new test cases to verify my change
  • I've regenerated toml.hpp (how-to)
  • I've updated any affected documentation
  • I've rebuilt and run the tests with at least one of:
    • Clang 8 or higher
    • GCC 8 or higher
    • MSVC 19.20 (Visual Studio 2019) or higher
  • I've added my name to the list of contributors in README.md

date_time.hpp was not including std_optional.hpp directly. It probably got it transitively from other files including it directly.
This caused clangd to complain at every `#include <toml++/toml.hpp>`
@@ -7,6 +7,7 @@
#include "forward_declarations.hpp"
#include "print_to_stream.hpp"
#include "header_start.hpp"
#include "std_optional.hpp"
Copy link
Owner

@marzer marzer Aug 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Order matters here; header_start.hpp needs to be the last include. Then this will be gucci 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants