Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 7 years ago

Language

Compiler

Options

Author

anonymous

over 7 years ago

$
prog.cc:12:41: error: invalid operands to binary expression ('slice_array<std::__1::valarray<int>::value_type>' (aka 'slice_array<int>') and 'typename enable_if<__is_val_expr<valarray<int> >::value, __val_expr<_BinaryOp<multiplies<typename valarray<int>::value_type>, valarray<int>, __scalar_expr<typename valarray<int>::value_type> > > >::type' (aka 'std::__1::__val_expr<std::__1::_BinaryOp<std::__1::multiplies<int>, std::__1::valarray<int>, std::__1::__scalar_expr<int> > >'))
  a[slice(0, 2, 1)] = a[slice(0, 2, 1)] + valarray<int>(a[slice(0, 2, 1)]) * a[0];
                      ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/wandbox/clang-head/include/c++/v1/valarray:3896:1: note: candidate function [with _Expr = std::__1::__val_expr<std::__1::_BinaryOp<std::__1::multiplies<int>, std::__1::valarray<int>, std::__1::__scalar_expr<int> > >] not viable: no known conversion from 'slice_array<std::__1::valarray<int>::value_type>' (aka 'slice_array<int>') to 'const typename __val_expr<_BinaryOp<multiplies<int>, valarray<int>, __scalar_expr<int> > >::value_type' (aka 'const int') for 1st argument
operator+(const typename _Expr::value_type& __x, const _Expr& __y)
^
/opt/wandbox/clang-head/include/c++/v1/iterator:761:1: note: candidate template ignored: could not match 'reverse_iterator' against '__val_expr'
operator+(typename reverse_iterator<_Iter>::difference_type __n, const reverse_iterator<_Iter>& __x)
^
/opt/wandbox/clang-head/include/c++/v1/iterator:1202:1: note: candidate template ignored: could not match 'move_iterator' against '__val_expr'
operator+(typename move_iterator<_Iter>::difference_type __n, const move_iterator<_Iter>& __x)
^
/opt/wandbox/clang-head/include/c++/v1/iterator:1615:1: note: candidate template ignored: could not match '__wrap_iter' against '__val_expr'
operator+(typename __wrap_iter<_Iter>::difference_type __n,
^
/opt/wandbox/clang-head/include/c++/v1/string:3765:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
^
/opt/wandbox/clang-head/include/c++/v1/string:3778:1: note: candidate template ignored: could not match 'const _CharT *' against 'slice_array<std::__1::valarray<int>::value_type>' (aka 'slice_array<int>')
operator+(const _CharT* __lhs , const basic_string<_CharT,_Traits,_Allocator>& __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3790:1: note: candidate template ignored: could not match 'basic_string' against '__val_expr'
operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Allocator>& __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3801:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT* __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3813:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, _CharT __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3827:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const basic_string<_CharT, _Traits, _Allocator>& __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3835:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, basic_string<_CharT, _Traits, _Allocator>&& __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3843:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, basic_string<_CharT, _Traits, _Allocator>&& __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3851:1: note: candidate template ignored: could not match 'const _CharT *' against 'slice_array<std::__1::valarray<int>::value_type>' (aka 'slice_array<int>')
operator+(const _CharT* __lhs , basic_string<_CharT,_Traits,_Allocator>&& __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3859:1: note: candidate template ignored: could not match 'basic_string' against '__val_expr'
operator+(_CharT __lhs, basic_string<_CharT,_Traits,_Allocator>&& __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3868:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const _CharT* __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3876:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, _CharT __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/valarray:3865:1: note: candidate template ignored: requirement '__is_val_expr<slice_array<int> >::value' was not satisfied [with _Expr1 = std::__1::slice_array<int>, _Expr2 = std::__1::__val_expr<std::__1::_BinaryOp<std::__1::multiplies<int>, std::__1::valarray<int>, std::__1::__scalar_expr<int> > >]
operator+(const _Expr1& __x, const _Expr2& __y)
^
/opt/wandbox/clang-head/include/c++/v1/valarray:3880:1: note: candidate template ignored: requirement '__is_val_expr<slice_array<int> >::value' was not satisfied [with _Expr = std::__1::slice_array<int>]
operator+(const _Expr& __x, const typename _Expr::value_type& __y)
^
prog.cc:22:39: error: invalid operands to binary expression ('slice_array<std::__1::valarray<int>::value_type>' (aka 'slice_array<int>') and 'typename enable_if<__is_val_expr<valarray<int> >::value, __val_expr<_BinaryOp<multiplies<typename valarray<int>::value_type>, valarray<int>, __scalar_expr<typename valarray<int>::value_type> > > >::type' (aka 'std::__1::__val_expr<std::__1::_BinaryOp<std::__1::multiplies<int>, std::__1::valarray<int>, std::__1::__scalar_expr<int> > >'))
  valarray<int> r = b[slice(0, 2, 1)] + valarray<int>(b[slice(0, 2, 1)]) * b[0];
                    ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/wandbox/clang-head/include/c++/v1/valarray:3896:1: note: candidate function [with _Expr = std::__1::__val_expr<std::__1::_BinaryOp<std::__1::multiplies<int>, std::__1::valarray<int>, std::__1::__scalar_expr<int> > >] not viable: no known conversion from 'slice_array<std::__1::valarray<int>::value_type>' (aka 'slice_array<int>') to 'const typename __val_expr<_BinaryOp<multiplies<int>, valarray<int>, __scalar_expr<int> > >::value_type' (aka 'const int') for 1st argument
operator+(const typename _Expr::value_type& __x, const _Expr& __y)
^
/opt/wandbox/clang-head/include/c++/v1/iterator:761:1: note: candidate template ignored: could not match 'reverse_iterator' against '__val_expr'
operator+(typename reverse_iterator<_Iter>::difference_type __n, const reverse_iterator<_Iter>& __x)
^
/opt/wandbox/clang-head/include/c++/v1/iterator:1202:1: note: candidate template ignored: could not match 'move_iterator' against '__val_expr'
operator+(typename move_iterator<_Iter>::difference_type __n, const move_iterator<_Iter>& __x)
^
/opt/wandbox/clang-head/include/c++/v1/iterator:1615:1: note: candidate template ignored: could not match '__wrap_iter' against '__val_expr'
operator+(typename __wrap_iter<_Iter>::difference_type __n,
^
/opt/wandbox/clang-head/include/c++/v1/string:3765:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
^
/opt/wandbox/clang-head/include/c++/v1/string:3778:1: note: candidate template ignored: could not match 'const _CharT *' against 'slice_array<std::__1::valarray<int>::value_type>' (aka 'slice_array<int>')
operator+(const _CharT* __lhs , const basic_string<_CharT,_Traits,_Allocator>& __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3790:1: note: candidate template ignored: could not match 'basic_string' against '__val_expr'
operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Allocator>& __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3801:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT* __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3813:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, _CharT __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3827:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const basic_string<_CharT, _Traits, _Allocator>& __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3835:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, basic_string<_CharT, _Traits, _Allocator>&& __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3843:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, basic_string<_CharT, _Traits, _Allocator>&& __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3851:1: note: candidate template ignored: could not match 'const _CharT *' against 'slice_array<std::__1::valarray<int>::value_type>' (aka 'slice_array<int>')
operator+(const _CharT* __lhs , basic_string<_CharT,_Traits,_Allocator>&& __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3859:1: note: candidate template ignored: could not match 'basic_string' against '__val_expr'
operator+(_CharT __lhs, basic_string<_CharT,_Traits,_Allocator>&& __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3868:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const _CharT* __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/string:3876:1: note: candidate template ignored: could not match 'basic_string' against 'slice_array'
operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, _CharT __rhs)
^
/opt/wandbox/clang-head/include/c++/v1/valarray:3865:1: note: candidate template ignored: requirement '__is_val_expr<slice_array<int> >::value' was not satisfied [with _Expr1 = std::__1::slice_array<int>, _Expr2 = std::__1::__val_expr<std::__1::_BinaryOp<std::__1::multiplies<int>, std::__1::valarray<int>, std::__1::__scalar_expr<int> > >]
operator+(const _Expr1& __x, const _Expr2& __y)
^
/opt/wandbox/clang-head/include/c++/v1/valarray:3880:1: note: candidate template ignored: requirement '__is_val_expr<slice_array<int> >::value' was not satisfied [with _Expr = std::__1::slice_array<int>]
operator+(const _Expr& __x, const typename _Expr::value_type& __y)
^
2 errors generated.
Exit Code:
1