-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compilation errors with Clang v16+. Also includes fixes for compiling with -std=c++23. #498
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,7 +95,7 @@ namespace sparta | |
*/ | ||
struct DataPointer { | ||
private: | ||
typename std::aligned_storage<sizeof(value_type), alignof(value_type)>::type object_memory_; | ||
alignas(value_type) std::byte object_memory_[sizeof(value_type)]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
public: | ||
DataPointer() { } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice cleanup! |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,56 +27,56 @@ | |
/*! | ||
* \brief Custom literal for uint64 | ||
*/ | ||
constexpr inline uint64_t operator "" _u64(unsigned long long i) { | ||
constexpr inline uint64_t operator ""_u64(unsigned long long i) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clang throws a compiler error if there is a space between the |
||
return i; | ||
} | ||
|
||
/*! | ||
* \brief Custom literal for uint32 | ||
*/ | ||
constexpr inline uint32_t operator "" _u32(unsigned long long i) { | ||
constexpr inline uint32_t operator ""_u32(unsigned long long i) { | ||
return i; | ||
} | ||
|
||
/*! | ||
* \brief Custom literal for uint16 | ||
*/ | ||
constexpr inline uint16_t operator "" _u16(unsigned long long i) { | ||
constexpr inline uint16_t operator ""_u16(unsigned long long i) { | ||
return i; | ||
} | ||
|
||
/*! | ||
* \brief Custom literal for uint8 | ||
*/ | ||
constexpr inline uint8_t operator "" _u8(unsigned long long i) { | ||
constexpr inline uint8_t operator ""_u8(unsigned long long i) { | ||
return i; | ||
} | ||
|
||
/*! | ||
* \brief Custom literal for int64 | ||
*/ | ||
constexpr inline int64_t operator "" _64(unsigned long long i) { | ||
constexpr inline int64_t operator ""_64(unsigned long long i) { | ||
return i; | ||
} | ||
|
||
/*! | ||
* \brief Custom literal for int32 | ||
*/ | ||
constexpr inline int32_t operator "" _32(unsigned long long i) { | ||
constexpr inline int32_t operator ""_32(unsigned long long i) { | ||
return i; | ||
} | ||
|
||
/*! | ||
* \brief Custom literal for int16 | ||
*/ | ||
constexpr inline int16_t operator "" _16(unsigned long long i) { | ||
constexpr inline int16_t operator ""_16(unsigned long long i) { | ||
return i; | ||
} | ||
|
||
/*! | ||
* \brief Custom literal for int8 | ||
*/ | ||
constexpr inline int8_t operator "" _8(unsigned long long i) { | ||
constexpr inline int8_t operator ""_8(unsigned long long i) { | ||
return i; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,6 +196,15 @@ void RootArchiveNode::saveTo(const std::string & dir) | |
archive_controller_->saveTo(dir); | ||
} | ||
|
||
ArchiveNode::ArchiveNode(const std::string & name) : | ||
name_(name) | ||
{ | ||
} | ||
|
||
ArchiveNode::~ArchiveNode() | ||
{ | ||
} | ||
|
||
Comment on lines
+199
to
+207
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moving these to the |
||
//Lazily walk up to the top of the tree to get the root node | ||
RootArchiveNode * ArchiveNode::getRoot() | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Workaround for a Clang bug: llvm/llvm-project#61415
This is essentially what
try_emplace
does under the hood, so performance shouldn't be affected.