Skip to content

Commit d04ff3e

Browse files
authored
Merge pull request #85 from ericli-splunk/issue-84
Update pointer test
2 parents 61e4b0d + 6063358 commit d04ff3e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

include/boost/leaf/error.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ namespace detail
429429
BOOST_LEAF_CONSTEXPR inline int load_slot( int err_id, E && e ) noexcept(OnError)
430430
{
431431
using T = typename std::decay<E>::type;
432-
static_assert(!std::is_pointer<E>::value, "Error objects of pointer types are not allowed");
432+
static_assert(!std::is_pointer<T>::value, "Error objects of pointer types are not allowed");
433433
static_assert(!std::is_same<T, error_id>::value, "Error objects of type error_id are not allowed");
434434
BOOST_LEAF_ASSERT((err_id&3) == 1);
435435
if( slot<T> * p = tls::read_ptr<slot<T>>() )
@@ -449,7 +449,7 @@ namespace detail
449449
{
450450
using E = typename function_traits<F>::return_type;
451451
using T = typename std::decay<E>::type;
452-
static_assert(!std::is_pointer<E>::value, "Error objects of pointer types are not allowed");
452+
static_assert(!std::is_pointer<T>::value, "Error objects of pointer types are not allowed");
453453
static_assert(!std::is_same<T, error_id>::value, "Error objects of type error_id are not allowed");
454454
BOOST_LEAF_ASSERT((err_id&3) == 1);
455455
if( slot<T> * p = tls::read_ptr<slot<T>>() )
@@ -469,7 +469,8 @@ namespace detail
469469
{
470470
static_assert(function_traits<F>::arity == 1, "Lambdas passed to accumulate must take a single e-type argument by reference");
471471
using E = typename std::decay<fn_arg_type<F,0>>::type;
472-
static_assert(!std::is_pointer<E>::value, "Error objects of pointer types are not allowed");
472+
using T = typename std::decay<E>::type;
473+
static_assert(!std::is_pointer<T>::value, "Error objects of pointer types are not allowed");
473474
BOOST_LEAF_ASSERT((err_id&3) == 1);
474475
if( auto sl = tls::read_ptr<slot<E>>() )
475476
{

0 commit comments

Comments
 (0)