Skip to content

Commit

Permalink
Change requires to use a default template argument (nonstd-lite-proje…
Browse files Browse the repository at this point in the history
…ct 40)

Fixes implementation of nsel_REQUIRES_T(), see martinmoene/nonstd-lite-project#40
  • Loading branch information
martinmoene committed Mar 6, 2020
1 parent 5e53c5f commit 0d28717
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions include/nonstd/expected.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ namespace nonstd {
template< bool B = (__VA_ARGS__), typename std::enable_if<B, int>::type = 0 >

#define nsel_REQUIRES_T(...) \
, typename = typename std::enable_if< (__VA_ARGS__), nonstd::expected_lite::detail::enabler >::type
, typename std::enable_if< (__VA_ARGS__), int >::type = 0

#define nsel_REQUIRES_R(R, ...) \
typename std::enable_if< (__VA_ARGS__), R>::type
Expand Down Expand Up @@ -424,10 +424,6 @@ class expected;

namespace detail {

/// for nsel_REQUIRES_T

enum class enabler{};

/// discriminated union to hold value or 'error'.

template< typename T, typename E >
Expand Down

0 comments on commit 0d28717

Please sign in to comment.