F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_28103978_27073.cpp: In function 'int main()':
0_0_28103978_27073.cpp:34:6: error: no matching function for call to 'generate_n(int [5], int&, int [5], main()::<lambda()>)'
     });
      ^
0_0_28103978_27073.cpp:34:6: note: candidate is:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
                 from 0_0_28103978_27073.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:4316:5: note: template<class _OIter, class _Size, class _Generator> _OIter std::generate_n(_OIter, _Size, _Generator)
     generate_n(_OutputIterator __first, _Size __n, _Generator __gen)
     ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:4316:5: note:   template argument deduction/substitution failed:
0_0_28103978_27073.cpp:34:6: note:   candidate expects 3 arguments, 4 provided
     });
      ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
                 from 0_0_28103978_27073.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h: In instantiation of '_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = int (*)[5]; _Funct = main()::<lambda(auto:1&)>]':
0_0_28103978_27073.cpp:24:6:   required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3755:14: error: invalid use of 'auto'
  __f(*__first);
              ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/numeric:62:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/random.tcc:33,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:51,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
                 from 0_0_28103978_27073.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_numeric.h: In instantiation of '_Tp std::accumulate(_InputIterator, _InputIterator, _Tp, _BinaryOperation) [with _InputIterator = int (*)[5]; _Tp = int; _BinaryOperation = std::_Bind<std::plus<int>(std::_Placeholder<1>, std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>)>]':
0_0_28103978_27073.cpp:33:47:   required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_numeric.h:154:39: error: no match for call to '(std::_Bind<std::plus<int>(std::_Placeholder<1>, std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>)>) (int&, int [5])'
  __init = __binary_op(__init, *__first);
                                       ^
In file included from 0_0_28103978_27073.cpp:5:0:
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1248:11: note: candidates are:
     class _Bind<_Functor(_Bound_args...)>
           ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1319:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) [with _Args = {_Args ...}; _Result = _Result; _Functor = std::plus<int>; _Bound_args = {std::_Placeholder<1>, std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>}]
  operator()(_Args&&... __args)
  ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1319:2: note:   template argument deduction/substitution failed:
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1317:40: error: invalid use of 'auto'
       std::declval<tuple<_Args...>&>() )... ) )>
                                        ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1333:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const [with _Args = {_Args ...}; _Result = _Result; _Functor = std::plus<int>; _Bound_args = {std::_Placeholder<1>, std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>}]
  operator()(_Args&&... __args) const
  ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1333:2: note:   template argument deduction/substitution failed:
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1331:40: error: invalid use of 'auto'
       std::declval<tuple<_Args...>&>() )... ) )>
                                        ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1347:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = std::plus<int>; _Bound_args = {std::_Placeholder<1>, std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>}]
  operator()(_Args&&... __args) volatile
  ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1347:2: note:   template argument deduction/substitution failed:
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1345:40: error: no match for call to '(std::_Mu<std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>, true, false>) (volatile std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>&, std::tuple<int&, int (&)[5]>&)'
       std::declval<tuple<_Args...>&>() )... ) )>
                                        ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1099:11: note: candidate is:
     class _Mu<_Arg, true, false>
           ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1104:2: note: template<class _CVArg, class ... _Args> decltype (__arg((declval<_Args>)()...)) std::_Mu<_Arg, true, false>::operator()(_CVArg&, std::tuple<_Args2 ...>&) const volatile [with _CVArg = _CVArg; _Args = {_Args ...}; _Arg = std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>]
  operator()(_CVArg& __arg,
  ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1104:2: note:   template argument deduction/substitution failed:
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional: In substitution of 'template<class _CVArg, class ... _Args> decltype (__arg((declval<_Args>)()...)) std::_Mu<_Arg, true, false>::operator()(_CVArg&, std::tuple<_Args2 ...>&) const volatile [with _CVArg = volatile std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>; _Args = {int&, int (&)[5]}]':
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1345:40:   required from '_Tp std::accumulate(_InputIterator, _InputIterator, _Tp, _BinaryOperation) [with _InputIterator = int (*)[5]; _Tp = int; _BinaryOperation = std::_Bind<std::plus<int>(std::_Placeholder<1>, std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>)>]'
0_0_28103978_27073.cpp:33:47:   required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1106:39: error: passing 'volatile std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>' as 'this' argument of '_Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) [with _Args = {int&, int (&)[5]}; _Result = auto; _Functor = main()::<lambda()> mutable::<lambda(const auto:2&)>; _Bound_args = {std::_Placeholder<2>}]' discards qualifiers [-fpermissive]
  -> decltype(__arg(declval<_Args>()...))
                                       ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_numeric.h: In instantiation of '_Tp std::accumulate(_InputIterator, _InputIterator, _Tp, _BinaryOperation) [with _InputIterator = int (*)[5]; _Tp = int; _BinaryOperation = std::_Bind<std::plus<int>(std::_Placeholder<1>, std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>)>]':
0_0_28103978_27073.cpp:33:47:   required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1361:2: note: template<class ... _Args, class _Result> _Result std::_Bind<_Functor(_Bound_args ...)>::operator()(_Args&& ...) const volatile [with _Args = {_Args ...}; _Result = _Result; _Functor = std::plus<int>; _Bound_args = {std::_Placeholder<1>, std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>}]
  operator()(_Args&&... __args) const volatile
  ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1361:2: note:   template argument deduction/substitution failed:
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1359:40: error: no match for call to '(std::_Mu<std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>, true, false>) (const volatile std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>&, std::tuple<int&, int (&)[5]>&)'
       std::declval<tuple<_Args...>&>() )... ) )>
                                        ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1099:11: note: candidate is:
     class _Mu<_Arg, true, false>
           ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1104:2: note: template<class _CVArg, class ... _Args> decltype (__arg((declval<_Args>)()...)) std::_Mu<_Arg, true, false>::operator()(_CVArg&, std::tuple<_Args2 ...>&) const volatile [with _CVArg = _CVArg; _Args = {_Args ...}; _Arg = std::_Bind<main()::<lambda()> mutable::<lambda(const auto:2&)>(std::_Placeholder<2>)>]
  operator()(_CVArg& __arg,
  ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional:1104:2: note:   template argument deduction/substitution failed:
GCC4.9.2/x86_64-w64-mingw32/include/c++/functional: In substitution of 'template<class _CVArg, class ... _Args> decltype (__arg((declval<_Args>)()...)) std::_Mu<_Arg, true, false>::operator()(_CVArg&, std::tuple<_Args2 ...>&) const volatile [with _CVArg = const volatile std::_Bind<main()::<lambda()> mutable::<lambda(cons


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-12-01 17:37:13, Gzip enabled