CI updates
This commit is contained in:
@@ -187,6 +187,26 @@ TEST_CASE("upx::noncopyable") {
|
||||
// <type_traits>
|
||||
**************************************************************************/
|
||||
|
||||
static_assert(!upx::is_bounded_array_v<std::nullptr_t>);
|
||||
static_assert(!upx::is_bounded_array_v<decltype(nullptr)>);
|
||||
static_assert(!upx::is_bounded_array_v<void *>);
|
||||
static_assert(!upx::is_bounded_array_v<int *>);
|
||||
static_assert(!upx::is_bounded_array_v<const int *>);
|
||||
static_assert(!upx::is_bounded_array_v<volatile int *>);
|
||||
static_assert(!upx::is_bounded_array_v<const volatile int *>);
|
||||
static_assert(upx::is_bounded_array_v<int[1]>);
|
||||
static_assert(upx::is_bounded_array_v<const int[1]>);
|
||||
static_assert(upx::is_bounded_array_v<volatile int[1]>);
|
||||
static_assert(upx::is_bounded_array_v<const volatile int[1]>);
|
||||
static_assert(upx::is_bounded_array_v<int[1u]>);
|
||||
static_assert(upx::is_bounded_array_v<const int[1u]>);
|
||||
static_assert(upx::is_bounded_array_v<volatile int[1u]>);
|
||||
static_assert(upx::is_bounded_array_v<const volatile int[1u]>);
|
||||
static_assert(upx::is_bounded_array_v<int[1l]>);
|
||||
static_assert(upx::is_bounded_array_v<const int[1l]>);
|
||||
static_assert(upx::is_bounded_array_v<volatile int[1l]>);
|
||||
static_assert(upx::is_bounded_array_v<const volatile int[1l]>);
|
||||
|
||||
static_assert(upx::is_same_all_v<int>);
|
||||
static_assert(upx::is_same_all_v<int, int>);
|
||||
static_assert(upx::is_same_all_v<int, int, int>);
|
||||
@@ -211,6 +231,36 @@ static_assert(!upx::is_same_any_v<upx_uintptr_t, unsigned, unsigned long, unsign
|
||||
static_assert(upx::is_same_any_v<upx_uintptr_t, unsigned, unsigned long, unsigned long long>);
|
||||
#endif
|
||||
|
||||
static_assert(std::is_same_v<int, upx::remove_cvref_t<int> >);
|
||||
static_assert(std::is_same_v<int, upx::remove_cvref_t<const int> >);
|
||||
static_assert(std::is_same_v<int, upx::remove_cvref_t<int &> >);
|
||||
static_assert(std::is_same_v<int, upx::remove_cvref_t<const int &> >);
|
||||
static_assert(std::is_same_v<int, upx::remove_cvref_t<int &&> >);
|
||||
static_assert(std::is_same_v<int, upx::remove_cvref_t<const int &&> >);
|
||||
static_assert(std::is_same_v<int *, upx::remove_cvref_t<int *> >);
|
||||
static_assert(std::is_same_v<int *, upx::remove_cvref_t<int *const> >);
|
||||
static_assert(std::is_same_v<const int *, upx::remove_cvref_t<const int *> >);
|
||||
static_assert(std::is_same_v<int *, upx::remove_cvref_t<int *&> >);
|
||||
static_assert(std::is_same_v<int *, upx::remove_cvref_t<int *const &> >);
|
||||
static_assert(std::is_same_v<const int *, upx::remove_cvref_t<const int *&> >);
|
||||
static_assert(std::is_same_v<int *, upx::remove_cvref_t<int *&&> >);
|
||||
static_assert(std::is_same_v<int *, upx::remove_cvref_t<int *const &&> >);
|
||||
static_assert(std::is_same_v<const int *, upx::remove_cvref_t<const int *&&> >);
|
||||
static_assert(std::is_same_v<int[1], upx::remove_cvref_t<int[1]> >);
|
||||
static_assert(std::is_same_v<int[1], upx::remove_cvref_t<const int[1]> >);
|
||||
|
||||
static_assert(std::is_same_v<int, upx::type_identity_t<int> >);
|
||||
static_assert(std::is_same_v<const int, upx::type_identity_t<const int> >);
|
||||
static_assert(std::is_same_v<int *, upx::type_identity_t<int *> >);
|
||||
static_assert(std::is_same_v<int *const, upx::type_identity_t<int *const> >);
|
||||
static_assert(std::is_same_v<const int *, upx::type_identity_t<const int *> >);
|
||||
static_assert(std::is_same_v<int &, upx::type_identity_t<int &> >);
|
||||
static_assert(std::is_same_v<const int &, upx::type_identity_t<const int &> >);
|
||||
static_assert(std::is_same_v<int &&, upx::type_identity_t<int &&> >);
|
||||
static_assert(std::is_same_v<const int &&, upx::type_identity_t<const int &&> >);
|
||||
static_assert(std::is_same_v<int[1], upx::type_identity_t<int[1]> >);
|
||||
static_assert(std::is_same_v<const int[1], upx::type_identity_t<const int[1]> >);
|
||||
|
||||
/*************************************************************************
|
||||
// <bit>
|
||||
**************************************************************************/
|
||||
|
||||
+4
-1
@@ -1211,6 +1211,7 @@ int upx_main(int argc, char *argv[]) may_throw {
|
||||
}
|
||||
|
||||
// Allow serial re-use of upx_main() as a subroutine
|
||||
exit_code = EXIT_OK;
|
||||
opt->reset();
|
||||
|
||||
#if (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_TOS || ACC_OS_WIN16 || \
|
||||
@@ -1313,8 +1314,10 @@ int upx_main(int argc, char *argv[]) may_throw {
|
||||
|
||||
/* start work */
|
||||
set_term(stdout);
|
||||
if (do_files(i, argc, argv) != 0)
|
||||
if (do_files(i, argc, argv) != 0) {
|
||||
assert(exit_code != 0);
|
||||
return exit_code;
|
||||
}
|
||||
|
||||
if (gitrev[0]) {
|
||||
// also see UPX_CONFIG_DISABLE_GITREV in CMakeLists.txt
|
||||
|
||||
+17
-1
@@ -156,7 +156,7 @@ protected:
|
||||
// <type_traits>
|
||||
**************************************************************************/
|
||||
|
||||
// is_bounded_array: identical to C++20 std::is_bounded_array
|
||||
// is_bounded_array from C++20
|
||||
template <class T>
|
||||
struct is_bounded_array : public std::false_type {};
|
||||
template <class T, std::size_t N>
|
||||
@@ -174,6 +174,22 @@ struct is_same_any : public std::disjunction<std::is_same<T, Ts>...> {};
|
||||
template <class T, class... Ts>
|
||||
inline constexpr bool is_same_any_v = is_same_any<T, Ts...>::value;
|
||||
|
||||
// remove_cvref from C++20
|
||||
template <class T>
|
||||
struct remove_cvref {
|
||||
typedef typename std::remove_cv<typename std::remove_reference<T>::type>::type type;
|
||||
};
|
||||
template <class T>
|
||||
using remove_cvref_t = typename remove_cvref<T>::type;
|
||||
|
||||
// type_identity from C++20
|
||||
template <class T>
|
||||
struct type_identity {
|
||||
typedef T type;
|
||||
};
|
||||
template <class T>
|
||||
using type_identity_t = typename type_identity<T>::type;
|
||||
|
||||
/*************************************************************************
|
||||
// <bit> C++20
|
||||
**************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user