Skip to content

Commit

Permalink
allow for tl/expected.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
bottiger1 committed May 14, 2024
1 parent a11e163 commit 17be414
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion amalgamate.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def merge_sources(*, source_dir: Path, covered_headers: Set[Path]):
return output

def do_polyfill(content):
return content.replace('<expected>', '<expected.hpp>') \
return content.replace('#include <expected>', '#if __has_include("expected.hpp")\n#include <expected.hpp>\n#else\n#include <tl/expected.hpp>\n#endif\n') \
.replace('std::expected', 'tl::expected') \
.replace('std::unexpected', 'tl::unexpected')

Expand Down

0 comments on commit 17be414

Please sign in to comment.