Integrate Refactor solver sources and dual MSVC CMake builds
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define FESA_CORE_ASCII_H_
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include "fesa/core/status.h"
|
||||
@@ -12,6 +13,11 @@ namespace fesa {
|
||||
/// @return The lowercase ASCII byte, or the input byte when it is not A-Z.
|
||||
char AsciiLower(char value) noexcept;
|
||||
|
||||
/// @brief Returns an uppercase ASCII copy without changing other source bytes.
|
||||
/// @note Embedded nulls and non-ASCII bytes are preserved without locale
|
||||
/// folding.
|
||||
std::string AsciiUppercase(std::string value);
|
||||
|
||||
/// @brief Compares two byte strings with ASCII-only case folding.
|
||||
/// @return True when the strings have equal length and equal ASCII-folded
|
||||
/// bytes.
|
||||
|
||||
@@ -24,6 +24,14 @@ struct SourceEntityId {
|
||||
std::string source_label_text;
|
||||
};
|
||||
|
||||
/// @brief Compares all preserved source fields without canonicalizing spelling.
|
||||
inline bool SourceIdentityEquals(const SourceEntityId& left,
|
||||
const SourceEntityId& right) noexcept {
|
||||
return left.instance_name == right.instance_name &&
|
||||
left.source_label == right.source_label &&
|
||||
left.source_label_text == right.source_label_text;
|
||||
}
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
#endif // FESA_CORE_SOURCE_IDENTITY_H_
|
||||
|
||||
@@ -98,11 +98,11 @@ class Result {
|
||||
struct FailureTag {};
|
||||
|
||||
/// @brief Constructs the successful value alternative.
|
||||
Result(SuccessTag, T value)
|
||||
Result(SuccessTag, T&& value)
|
||||
: value_{std::move(value)}, status_{Status::Ok()} {}
|
||||
|
||||
/// @brief Constructs the failed status alternative.
|
||||
Result(FailureTag, Status status)
|
||||
Result(FailureTag, Status&& status)
|
||||
: value_{std::nullopt}, status_{std::move(status)} {}
|
||||
|
||||
std::optional<T> value_;
|
||||
|
||||
Reference in New Issue
Block a user