Skip to content

Commit

Permalink
v2.2.8 release matching Boost 1.84.
Browse files Browse the repository at this point in the history
  • Loading branch information
ned14 committed Dec 16, 2023
1 parent f7892ac commit 645500f
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 52 deletions.
2 changes: 1 addition & 1 deletion doc/src/content/changelog/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ weight = 80
+++

---
## v2.2.8 ? 2023 (Boost 1.84) [[release]](https://github.com/ned14/outcome/releases/tag/v2.2.8)
## v2.2.8 13th December 2023 (Boost 1.84) [[release]](https://github.com/ned14/outcome/releases/tag/v2.2.8)

### Enhancements:

Expand Down
6 changes: 3 additions & 3 deletions include/outcome/detail/revision.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ Distributed under the Boost Software License, Version 1.0.
*/

// Note the second line of this file must ALWAYS be the git SHA, third line ALWAYS the git SHA update time
#define OUTCOME_PREVIOUS_COMMIT_REF 441e3164801151ae7671ea331a04b4a712f505e9
#define OUTCOME_PREVIOUS_COMMIT_DATE "2023-10-31 21:54:05 +00:00"
#define OUTCOME_PREVIOUS_COMMIT_UNIQUE 441e3164
#define OUTCOME_PREVIOUS_COMMIT_REF f7892ac2e8ef0a236f324a9111e75824ae55690a
#define OUTCOME_PREVIOUS_COMMIT_DATE "2023-11-17 08:58:53 +00:00"
#define OUTCOME_PREVIOUS_COMMIT_UNIQUE f7892ac2
55 changes: 39 additions & 16 deletions single-header/outcome-basic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,11 @@ This is a dummy header file which is a placeholder for the real config.hpp which
gets generated by the build system. This file is here to allow the library to be
used without the build system.
*/
#if defined(min)
#error "You must not define min() as a macro, because this is unsupported and known to break e.g. LLFIO"
#elif defined(max)
#error "You must not define max() as a macro, because this is unsupported and known to break e.g. LLFIO"
#endif
#define QUICKCPPLIB_VERSION_GLUE2(a, b) a##b
#define QUICKCPPLIB_VERSION_GLUE(a, b) QUICKCPPLIB_VERSION_GLUE2(a, b)
// clang-format off
Expand Down Expand Up @@ -696,7 +701,7 @@ extern "C" void _mm_pause();
#endif
#endif
#ifndef QUICKCPPLIB_NODISCARD
#if QUICKCPPLIB_HAS_CPP_ATTRIBUTE(nodiscard, 201700) && (!defined(__GNUC__) || __cpp_concepts >= 202000L /* -fconcepts-ts and [[nodiscard]] don't mix on GCC \
#if QUICKCPPLIB_HAS_CPP_ATTRIBUTE(nodiscard, 201700) && (!defined(__GNUC__) || !defined(__cpp_concepts) || __cpp_concepts >= 202000L /* -fconcepts-ts and [[nodiscard]] don't mix on GCC \
*/)
#define QUICKCPPLIB_NODISCARD [[nodiscard]]
#elif defined(__clang__) // deliberately not GCC
Expand Down Expand Up @@ -1014,9 +1019,9 @@ Distributed under the Boost Software License, Version 1.0.
http://www.boost.org/LICENSE_1_0.txt)
*/
// Note the second line of this file must ALWAYS be the git SHA, third line ALWAYS the git SHA update time
#define OUTCOME_PREVIOUS_COMMIT_REF 441e3164801151ae7671ea331a04b4a712f505e9
#define OUTCOME_PREVIOUS_COMMIT_DATE "2023-10-31 21:54:05 +00:00"
#define OUTCOME_PREVIOUS_COMMIT_UNIQUE 441e3164
#define OUTCOME_PREVIOUS_COMMIT_REF f7892ac2e8ef0a236f324a9111e75824ae55690a
#define OUTCOME_PREVIOUS_COMMIT_DATE "2023-11-17 08:58:53 +00:00"
#define OUTCOME_PREVIOUS_COMMIT_UNIQUE f7892ac2
#define OUTCOME_V2 (QUICKCPPLIB_BIND_NAMESPACE_VERSION(outcome_v2))
#ifdef _DEBUG
#define OUTCOME_V2_CXX_MODULE_NAME QUICKCPPLIB_BIND_NAMESPACE((QUICKCPPLIB_BIND_NAMESPACE_VERSION(outcome_v2d)))
Expand Down Expand Up @@ -3639,7 +3644,7 @@ namespace detail
NoValuePolicy::narrow_error_check(static_cast<basic_result_error_observers &>(*this));
return this->_state._error;
}
constexpr const error_type &assume_error() const &noexcept
constexpr const error_type &assume_error() const & noexcept
{
NoValuePolicy::narrow_error_check(static_cast<const basic_result_error_observers &>(*this));
return this->_state._error;
Expand All @@ -3649,7 +3654,7 @@ namespace detail
NoValuePolicy::narrow_error_check(static_cast<basic_result_error_observers &&>(*this));
return static_cast<error_type &&>(this->_state._error);
}
constexpr const error_type &&assume_error() const &&noexcept
constexpr const error_type &&assume_error() const && noexcept
{
NoValuePolicy::narrow_error_check(static_cast<const basic_result_error_observers &&>(*this));
return static_cast<const error_type &&>(this->_state._error);
Expand Down Expand Up @@ -3679,8 +3684,14 @@ namespace detail
{
public:
using Base::Base;
constexpr void assume_error() const noexcept { NoValuePolicy::narrow_error_check(*this); }
constexpr void error() const { NoValuePolicy::wide_error_check(*this); }
constexpr void assume_error() & noexcept { NoValuePolicy::narrow_error_check(static_cast<basic_result_error_observers &>(*this)); }
constexpr void assume_error() const & noexcept { NoValuePolicy::narrow_error_check(static_cast<const basic_result_error_observers &>(*this)); }
constexpr void assume_error() && noexcept { NoValuePolicy::narrow_error_check(static_cast<basic_result_error_observers &&>(*this)); }
constexpr void assume_error() const && noexcept { NoValuePolicy::narrow_error_check(static_cast<const basic_result_error_observers &&>(*this)); }
constexpr void error() & { NoValuePolicy::wide_error_check(static_cast<basic_result_error_observers &>(*this)); }
constexpr void error() const & { NoValuePolicy::wide_error_check(static_cast<const basic_result_error_observers &>(*this)); }
constexpr void error() && { NoValuePolicy::wide_error_check(static_cast<basic_result_error_observers &&>(*this)); }
constexpr void error() const && { NoValuePolicy::wide_error_check(static_cast<const basic_result_error_observers &&>(*this)); }
};
} // namespace detail
OUTCOME_V2_NAMESPACE_END
Expand Down Expand Up @@ -3723,7 +3734,7 @@ namespace detail
NoValuePolicy::narrow_value_check(static_cast<basic_result_value_observers &>(*this));
return this->_state._value; // NOLINT
}
constexpr const value_type &assume_value() const &noexcept
constexpr const value_type &assume_value() const & noexcept
{
NoValuePolicy::narrow_value_check(static_cast<const basic_result_value_observers &>(*this));
return this->_state._value; // NOLINT
Expand All @@ -3733,7 +3744,7 @@ namespace detail
NoValuePolicy::narrow_value_check(static_cast<basic_result_value_observers &&>(*this));
return static_cast<value_type &&>(this->_state._value); // NOLINT
}
constexpr const value_type &&assume_value() const &&noexcept
constexpr const value_type &&assume_value() const && noexcept
{
NoValuePolicy::narrow_value_check(static_cast<const basic_result_value_observers &&>(*this));
return static_cast<const value_type &&>(this->_state._value); // NOLINT
Expand Down Expand Up @@ -3763,8 +3774,14 @@ namespace detail
{
public:
using Base::Base;
constexpr void assume_value() const noexcept { NoValuePolicy::narrow_value_check(*this); }
constexpr void value() const { NoValuePolicy::wide_value_check(*this); }
constexpr void assume_value() & noexcept { NoValuePolicy::narrow_value_check(static_cast<basic_result_value_observers &>(*this)); }
constexpr void assume_value() const & noexcept { NoValuePolicy::narrow_value_check(static_cast<const basic_result_value_observers &>(*this)); }
constexpr void assume_value() && noexcept { NoValuePolicy::narrow_value_check(static_cast<basic_result_value_observers &&>(*this)); }
constexpr void assume_value() const && noexcept { NoValuePolicy::narrow_value_check(static_cast<const basic_result_value_observers &&>(*this)); }
constexpr void value() & { NoValuePolicy::wide_value_check(static_cast<basic_result_value_observers &>(*this)); }
constexpr void value() const & { NoValuePolicy::wide_value_check(static_cast<const basic_result_value_observers &>(*this)); }
constexpr void value() && { NoValuePolicy::wide_value_check(static_cast<basic_result_value_observers &&>(*this)); }
constexpr void value() const && { NoValuePolicy::wide_value_check(static_cast<const basic_result_value_observers &&>(*this)); }
};
} // namespace detail
OUTCOME_V2_NAMESPACE_END
Expand Down Expand Up @@ -4881,9 +4898,9 @@ namespace detail
using exception_type = P;
using Base::Base;
constexpr inline exception_type &assume_exception() & noexcept;
constexpr inline const exception_type &assume_exception() const &noexcept;
constexpr inline const exception_type &assume_exception() const & noexcept;
constexpr inline exception_type &&assume_exception() && noexcept;
constexpr inline const exception_type &&assume_exception() const &&noexcept;
constexpr inline const exception_type &&assume_exception() const && noexcept;
constexpr inline exception_type &exception() &;
constexpr inline const exception_type &exception() const &;
constexpr inline exception_type &&exception() &&;
Expand All @@ -4894,8 +4911,14 @@ namespace detail
{
public:
using Base::Base;
constexpr void assume_exception() const noexcept { NoValuePolicy::narrow_exception_check(this); }
constexpr void exception() const { NoValuePolicy::wide_exception_check(this); }
constexpr void assume_exception() & noexcept { NoValuePolicy::narrow_exception_check(*this); }
constexpr void assume_exception() const & noexcept { NoValuePolicy::narrow_exception_check(*this); }
constexpr void assume_exception() && noexcept { NoValuePolicy::narrow_exception_check(std::move(*this)); }
constexpr void assume_exception() const && noexcept { NoValuePolicy::narrow_exception_check(std::move(*this)); }
constexpr void exception() & { NoValuePolicy::wide_exception_check(*this); }
constexpr void exception() const & { NoValuePolicy::wide_exception_check(*this); }
constexpr void exception() && { NoValuePolicy::wide_exception_check(std::move(*this)); }
constexpr void exception() const && { NoValuePolicy::wide_exception_check(std::move(*this)); }
};
} // namespace detail
OUTCOME_V2_NAMESPACE_END
Expand Down
55 changes: 39 additions & 16 deletions single-header/outcome-experimental.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,11 @@ This is a dummy header file which is a placeholder for the real config.hpp which
gets generated by the build system. This file is here to allow the library to be
used without the build system.
*/
#if defined(min)
#error "You must not define min() as a macro, because this is unsupported and known to break e.g. LLFIO"
#elif defined(max)
#error "You must not define max() as a macro, because this is unsupported and known to break e.g. LLFIO"
#endif
#define QUICKCPPLIB_VERSION_GLUE2(a, b) a##b
#define QUICKCPPLIB_VERSION_GLUE(a, b) QUICKCPPLIB_VERSION_GLUE2(a, b)
// clang-format off
Expand Down Expand Up @@ -721,7 +726,7 @@ extern "C" void _mm_pause();
#endif
#endif
#ifndef QUICKCPPLIB_NODISCARD
#if QUICKCPPLIB_HAS_CPP_ATTRIBUTE(nodiscard, 201700) && (!defined(__GNUC__) || __cpp_concepts >= 202000L /* -fconcepts-ts and [[nodiscard]] don't mix on GCC \
#if QUICKCPPLIB_HAS_CPP_ATTRIBUTE(nodiscard, 201700) && (!defined(__GNUC__) || !defined(__cpp_concepts) || __cpp_concepts >= 202000L /* -fconcepts-ts and [[nodiscard]] don't mix on GCC \
*/)
#define QUICKCPPLIB_NODISCARD [[nodiscard]]
#elif defined(__clang__) // deliberately not GCC
Expand Down Expand Up @@ -1039,9 +1044,9 @@ Distributed under the Boost Software License, Version 1.0.
http://www.boost.org/LICENSE_1_0.txt)
*/
// Note the second line of this file must ALWAYS be the git SHA, third line ALWAYS the git SHA update time
#define OUTCOME_PREVIOUS_COMMIT_REF 441e3164801151ae7671ea331a04b4a712f505e9
#define OUTCOME_PREVIOUS_COMMIT_DATE "2023-10-31 21:54:05 +00:00"
#define OUTCOME_PREVIOUS_COMMIT_UNIQUE 441e3164
#define OUTCOME_PREVIOUS_COMMIT_REF f7892ac2e8ef0a236f324a9111e75824ae55690a
#define OUTCOME_PREVIOUS_COMMIT_DATE "2023-11-17 08:58:53 +00:00"
#define OUTCOME_PREVIOUS_COMMIT_UNIQUE f7892ac2
#define OUTCOME_V2 (QUICKCPPLIB_BIND_NAMESPACE_VERSION(outcome_v2))
#ifdef _DEBUG
#define OUTCOME_V2_CXX_MODULE_NAME QUICKCPPLIB_BIND_NAMESPACE((QUICKCPPLIB_BIND_NAMESPACE_VERSION(outcome_v2d)))
Expand Down Expand Up @@ -3664,7 +3669,7 @@ namespace detail
NoValuePolicy::narrow_error_check(static_cast<basic_result_error_observers &>(*this));
return this->_state._error;
}
constexpr const error_type &assume_error() const &noexcept
constexpr const error_type &assume_error() const & noexcept
{
NoValuePolicy::narrow_error_check(static_cast<const basic_result_error_observers &>(*this));
return this->_state._error;
Expand All @@ -3674,7 +3679,7 @@ namespace detail
NoValuePolicy::narrow_error_check(static_cast<basic_result_error_observers &&>(*this));
return static_cast<error_type &&>(this->_state._error);
}
constexpr const error_type &&assume_error() const &&noexcept
constexpr const error_type &&assume_error() const && noexcept
{
NoValuePolicy::narrow_error_check(static_cast<const basic_result_error_observers &&>(*this));
return static_cast<const error_type &&>(this->_state._error);
Expand Down Expand Up @@ -3704,8 +3709,14 @@ namespace detail
{
public:
using Base::Base;
constexpr void assume_error() const noexcept { NoValuePolicy::narrow_error_check(*this); }
constexpr void error() const { NoValuePolicy::wide_error_check(*this); }
constexpr void assume_error() & noexcept { NoValuePolicy::narrow_error_check(static_cast<basic_result_error_observers &>(*this)); }
constexpr void assume_error() const & noexcept { NoValuePolicy::narrow_error_check(static_cast<const basic_result_error_observers &>(*this)); }
constexpr void assume_error() && noexcept { NoValuePolicy::narrow_error_check(static_cast<basic_result_error_observers &&>(*this)); }
constexpr void assume_error() const && noexcept { NoValuePolicy::narrow_error_check(static_cast<const basic_result_error_observers &&>(*this)); }
constexpr void error() & { NoValuePolicy::wide_error_check(static_cast<basic_result_error_observers &>(*this)); }
constexpr void error() const & { NoValuePolicy::wide_error_check(static_cast<const basic_result_error_observers &>(*this)); }
constexpr void error() && { NoValuePolicy::wide_error_check(static_cast<basic_result_error_observers &&>(*this)); }
constexpr void error() const && { NoValuePolicy::wide_error_check(static_cast<const basic_result_error_observers &&>(*this)); }
};
} // namespace detail
OUTCOME_V2_NAMESPACE_END
Expand Down Expand Up @@ -3748,7 +3759,7 @@ namespace detail
NoValuePolicy::narrow_value_check(static_cast<basic_result_value_observers &>(*this));
return this->_state._value; // NOLINT
}
constexpr const value_type &assume_value() const &noexcept
constexpr const value_type &assume_value() const & noexcept
{
NoValuePolicy::narrow_value_check(static_cast<const basic_result_value_observers &>(*this));
return this->_state._value; // NOLINT
Expand All @@ -3758,7 +3769,7 @@ namespace detail
NoValuePolicy::narrow_value_check(static_cast<basic_result_value_observers &&>(*this));
return static_cast<value_type &&>(this->_state._value); // NOLINT
}
constexpr const value_type &&assume_value() const &&noexcept
constexpr const value_type &&assume_value() const && noexcept
{
NoValuePolicy::narrow_value_check(static_cast<const basic_result_value_observers &&>(*this));
return static_cast<const value_type &&>(this->_state._value); // NOLINT
Expand Down Expand Up @@ -3788,8 +3799,14 @@ namespace detail
{
public:
using Base::Base;
constexpr void assume_value() const noexcept { NoValuePolicy::narrow_value_check(*this); }
constexpr void value() const { NoValuePolicy::wide_value_check(*this); }
constexpr void assume_value() & noexcept { NoValuePolicy::narrow_value_check(static_cast<basic_result_value_observers &>(*this)); }
constexpr void assume_value() const & noexcept { NoValuePolicy::narrow_value_check(static_cast<const basic_result_value_observers &>(*this)); }
constexpr void assume_value() && noexcept { NoValuePolicy::narrow_value_check(static_cast<basic_result_value_observers &&>(*this)); }
constexpr void assume_value() const && noexcept { NoValuePolicy::narrow_value_check(static_cast<const basic_result_value_observers &&>(*this)); }
constexpr void value() & { NoValuePolicy::wide_value_check(static_cast<basic_result_value_observers &>(*this)); }
constexpr void value() const & { NoValuePolicy::wide_value_check(static_cast<const basic_result_value_observers &>(*this)); }
constexpr void value() && { NoValuePolicy::wide_value_check(static_cast<basic_result_value_observers &&>(*this)); }
constexpr void value() const && { NoValuePolicy::wide_value_check(static_cast<const basic_result_value_observers &&>(*this)); }
};
} // namespace detail
OUTCOME_V2_NAMESPACE_END
Expand Down Expand Up @@ -4906,9 +4923,9 @@ namespace detail
using exception_type = P;
using Base::Base;
constexpr inline exception_type &assume_exception() & noexcept;
constexpr inline const exception_type &assume_exception() const &noexcept;
constexpr inline const exception_type &assume_exception() const & noexcept;
constexpr inline exception_type &&assume_exception() && noexcept;
constexpr inline const exception_type &&assume_exception() const &&noexcept;
constexpr inline const exception_type &&assume_exception() const && noexcept;
constexpr inline exception_type &exception() &;
constexpr inline const exception_type &exception() const &;
constexpr inline exception_type &&exception() &&;
Expand All @@ -4919,8 +4936,14 @@ namespace detail
{
public:
using Base::Base;
constexpr void assume_exception() const noexcept { NoValuePolicy::narrow_exception_check(this); }
constexpr void exception() const { NoValuePolicy::wide_exception_check(this); }
constexpr void assume_exception() & noexcept { NoValuePolicy::narrow_exception_check(*this); }
constexpr void assume_exception() const & noexcept { NoValuePolicy::narrow_exception_check(*this); }
constexpr void assume_exception() && noexcept { NoValuePolicy::narrow_exception_check(std::move(*this)); }
constexpr void assume_exception() const && noexcept { NoValuePolicy::narrow_exception_check(std::move(*this)); }
constexpr void exception() & { NoValuePolicy::wide_exception_check(*this); }
constexpr void exception() const & { NoValuePolicy::wide_exception_check(*this); }
constexpr void exception() && { NoValuePolicy::wide_exception_check(std::move(*this)); }
constexpr void exception() const && { NoValuePolicy::wide_exception_check(std::move(*this)); }
};
} // namespace detail
OUTCOME_V2_NAMESPACE_END
Expand Down
Loading

0 comments on commit 645500f

Please sign in to comment.