Common/Result: Swap order of template parameters to match C++26's std::expected, make all member functions constexpr, and add moving "unexpected" conversion constructor for consistency.

This commit is contained in:
Jordan Woyak
2025-11-21 19:24:48 -06:00
parent f38a2bbb0e
commit 127e068e51
7 changed files with 36 additions and 32 deletions
+1 -3
View File
@@ -8,8 +8,6 @@
#include <memory>
#include <thread>
#include <utility>
#include <variant>
#include <vector>
#include "Common/Assert.h"
#include "Common/Event.h"
@@ -27,7 +25,7 @@ enum class ConversionResultCode
};
template <typename T>
using ConversionResult = Common::Result<ConversionResultCode, T>;
using ConversionResult = Common::Result<T, ConversionResultCode>;
// This class starts a number of compression threads and one output thread.
// The set_up_compress_thread_state function is called at the start of each compression thread.