dimanche 28 janvier 2018

Error using std::cref and std::ref

Old compilers for c++11 does not support std::cref and std::ref.... May I know if there is an alternative to these. I am getting below errors..

Error 1 :

/usr/include/boost/concept/detail/has_constraints.hpp:32:62:   [ skipping 8 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]

Error 2 :

/usr/include/boost/iterator/transform_iterator.hpp:84:26: error: no matching function for call to ‘std::reference_wrapper<const SequencePair<T_INDEX, T_ELEMENT>::new5() [with T_INDEX = unsigned int; T_ELEMENT = double]::__lambda0>::reference_wrapper()’
     transform_iterator() { }
                          ^
/usr/include/boost/iterator/transform_iterator.hpp:84:26: note: candidates are:
In file included from /usr/include/c++/4.8/memory:79:0,
                 from /usr/include/boost/unordered/unordered_set_fwd.hpp:14,
                 from /usr/include/boost/unordered/unordered_set.hpp:16,
                 from /usr/include/boost/unordered_set.hpp:16,
                 from /usr/include/boost/graph/adjacency_list.hpp:21,
                 from /usr/include/boost/graph/directed_graph.hpp:10,
                 from ../main.cpp:12:
/usr/include/c++/4.8/functional:445:7: note: std::reference_wrapper<_Tp>::reference_wrapper(const std::reference_wrapper<_Tp>&) [with _Tp = const SequencePair<T_INDEX, T_ELEMENT>::new5() [with T_INDEX = unsigned int; T_ELEMENT = double]::__lambda0]
       reference_wrapper(const reference_wrapper<_Tp>& __inref) noexcept
       ^
/usr/include/c++/4.8/functional:445:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/4.8/functional:439:7: note: std::reference_wrapper<_Tp>::reference_wrapper(_Tp&) [with _Tp = const SequencePair<T_INDEX, T_ELEMENT>::new5() [with T_INDEX = unsigned int; T_ELEMENT = double]::__lambda0]
       reference_wrapper(_Tp& __indata) noexcept
       ^
/usr/include/c++/4.8/functional:439:7: note:   candidate expects 1 argument, 0 provided
make: *** [main.o] Error 1

Aucun commentaire:

Enregistrer un commentaire