Skip to content

Commit 80c81b2

Browse files
committed
Added workarounds for AppleClang from Xcode-15.4 and older
1 parent 6a97831 commit 80c81b2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

benchmark/utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct Timer
4848
using Duration = std::chrono::duration<double>;
4949
Timer(): start{Clock::now()} {}
5050
Duration elapsed() const { return {Clock::now() - start}; }
51-
~Timer() { std::cout << "Completed in " << elapsed() << std::endl; }
51+
~Timer() { std::cout << "Completed in " << elapsed().count() << std::endl; }
5252
Timer(const Timer&) = default;
5353
Timer& operator=(const Timer&) = default;
5454

src/ptrie/ptrie.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,9 @@ __ptrie<PTRIETLPA>::~__ptrie() noexcept
560560
fwdnode_t* fwdnode;
561561
size_t depth;
562562
uint16_t encsize;
563+
// AppleClang from Xcode-15.4 and older needs this constructor for emplace to work:
564+
NodeContext(fwdnode_t* fwdnode, size_t depth, uint16_t encsize):
565+
fwdnode{fwdnode}, depth{depth}, encsize{encsize} {}
563566
};
564567
auto stack = std::stack<NodeContext>{};
565568
stack.emplace(&_root, 0, 0);

0 commit comments

Comments
 (0)