Skip to content

Commit

Permalink
Add #include <algorithm> to fix building with gcc 14 (#1104)
Browse files Browse the repository at this point in the history
With gcc 14 some C++ Standard Library headers have been changed to no
longer include other headers that were used internally by the library.
In luau's case it is the `<algorithm>` header.
  • Loading branch information
kostadinsh authored Nov 16, 2023
1 parent d2059dd commit 0492ecf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Analysis/src/ConstraintSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "Luau/TypeUtils.h"
#include "Luau/Unifier2.h"
#include "Luau/VisitType.h"
#include <algorithm>
#include <utility>

LUAU_FASTFLAGVARIABLE(DebugLuauLogSolver, false);
Expand Down
2 changes: 2 additions & 0 deletions Analysis/src/Instantiation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include "Luau/TypeArena.h"
#include "Luau/TypeCheckLimits.h"

#include <algorithm>

LUAU_FASTFLAG(DebugLuauDeferredConstraintResolution)

namespace Luau
Expand Down
1 change: 1 addition & 0 deletions CodeGen/src/IrAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "lobject.h"

#include <algorithm>
#include <bitset>

#include <stddef.h>
Expand Down
2 changes: 2 additions & 0 deletions tests/RuntimeLimits.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

#include "doctest.h"

#include <algorithm>

using namespace Luau;

struct LimitFixture : BuiltinsFixture
Expand Down

0 comments on commit 0492ecf

Please sign in to comment.