mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Replaced include/swift/Basic/Algorithm.h with calls to standard algorithms
LLVM now requires C++14, and the header says the algorithms are backported from C++14.
This commit is contained in:
@@ -17,13 +17,12 @@
|
||||
#ifndef SWIFT_BASIC_FLAGGEDPOINTER_H
|
||||
#define SWIFT_BASIC_FLAGGEDPOINTER_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Support/PointerLikeTypeTraits.h"
|
||||
|
||||
#include "Algorithm.h"
|
||||
|
||||
namespace swift {
|
||||
|
||||
/// This class implements a pair of a pointer and boolean flag.
|
||||
@@ -170,7 +169,7 @@ public:
|
||||
enum {
|
||||
NumLowBitsAvailable = (BitPosition >= PtrTraits::NumLowBitsAvailable)
|
||||
? PtrTraits::NumLowBitsAvailable
|
||||
: (swift::min(int(BitPosition + 1),
|
||||
: (std::min(int(BitPosition + 1),
|
||||
int(PtrTraits::NumLowBitsAvailable)) - 1)
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user