mirror of
https://github.com/TartanLlama/expected.git
synced 2025-08-03 19:04:29 +02:00
Fix GCC 5.5.
This commit is contained in:
17
.travis.yml
17
.travis.yml
@@ -5,6 +5,14 @@ sudo: false
|
|||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- compiler: gcc
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
- g++-5
|
||||||
|
env: COMPILER=g++-5 CXXSTD=11
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
@@ -127,6 +135,15 @@ matrix:
|
|||||||
- libc++-dev
|
- libc++-dev
|
||||||
env: COMPILER=clang++-6.0 CXXSTD=11
|
env: COMPILER=clang++-6.0 CXXSTD=11
|
||||||
|
|
||||||
|
- compiler: gcc
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
- g++-5
|
||||||
|
env: COMPILER=g++-5 CXXSTD=14
|
||||||
|
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
|
@@ -46,6 +46,12 @@
|
|||||||
#define TL_EXPECTED_GCC54
|
#define TL_EXPECTED_GCC54
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (defined(__GNUC__) && __GNUC__ == 5 && __GNUC_MINOR__ <= 5 && \
|
||||||
|
!defined(__clang__))
|
||||||
|
/// \exclude
|
||||||
|
#define TL_EXPECTED_GCC55
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 9 && \
|
#if (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 9 && \
|
||||||
!defined(__clang__))
|
!defined(__clang__))
|
||||||
// GCC < 5 doesn't support overloading on const&& for member functions
|
// GCC < 5 doesn't support overloading on const&& for member functions
|
||||||
@@ -1128,7 +1134,7 @@ public:
|
|||||||
typedef unexpected<E> unexpected_type;
|
typedef unexpected<E> unexpected_type;
|
||||||
|
|
||||||
#if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
|
#if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
|
||||||
!defined(TL_EXPECTED_GCC54)
|
!defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
|
||||||
/// \group and_then
|
/// \group and_then
|
||||||
/// Carries out some operation which returns an expected on the stored object
|
/// Carries out some operation which returns an expected on the stored object
|
||||||
/// if there is one. \requires `std::invoke(std::forward<F>(f), value())`
|
/// if there is one. \requires `std::invoke(std::forward<F>(f), value())`
|
||||||
@@ -1206,7 +1212,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
|
#if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
|
||||||
!defined(TL_EXPECTED_GCC54)
|
!defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
|
||||||
/// \brief Carries out some operation on the stored object if there is one.
|
/// \brief Carries out some operation on the stored object if there is one.
|
||||||
/// \returns Let `U` be the result of `std::invoke(std::forward<F>(f),
|
/// \returns Let `U` be the result of `std::invoke(std::forward<F>(f),
|
||||||
/// value())`. If `U` is `void`, returns an `expected<monostate,E>, otherwise
|
/// value())`. If `U` is `void`, returns an `expected<monostate,E>, otherwise
|
||||||
@@ -1287,7 +1293,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
|
#if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
|
||||||
!defined(TL_EXPECTED_GCC54)
|
!defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
|
||||||
/// \brief Carries out some operation on the stored unexpected object if there
|
/// \brief Carries out some operation on the stored unexpected object if there
|
||||||
/// is one.
|
/// is one.
|
||||||
/// \returns Let `U` be the result of `std::invoke(std::forward<F>(f),
|
/// \returns Let `U` be the result of `std::invoke(std::forward<F>(f),
|
||||||
@@ -1955,7 +1961,7 @@ auto expected_map_impl(Exp &&exp, F &&f) -> expected<void, err_t<Exp>> {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
|
#if defined(TL_EXPECTED_CXX14) && !defined(TL_EXPECTED_GCC49) && \
|
||||||
!defined(TL_EXPECTED_GCC54)
|
!defined(TL_EXPECTED_GCC54) && !defined(TL_EXPECTED_GCC55)
|
||||||
template <class Exp, class F,
|
template <class Exp, class F,
|
||||||
class Ret = decltype(detail::invoke(std::declval<F>(),
|
class Ret = decltype(detail::invoke(std::declval<F>(),
|
||||||
std::declval<Exp>().error())),
|
std::declval<Exp>().error())),
|
||||||
|
Reference in New Issue
Block a user