DaehwanKimLab / tophat

Spliced read mapper for RNA-Seq
http://ccb.jhu.edu/software/tophat
Boost Software License 1.0
90 stars 46 forks source link

remove explicit make_pair template arguments #38

Open wookietreiber opened 8 years ago

wookietreiber commented 8 years ago
tophat_reports.cpp:2708:128: error: no matching function for call to ‘make_pair(Junction, JunctionStats&)’
     gtf_junctions.insert(make_pair<Junction, JunctionStats>(Junction(ref_id, left_coord, right_coord, antisense), junction_stat));
                                                                                                                                ^
In file included from /usr/include/c++/6.1.1/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/6.1.1/bits/char_traits.h:39,
                 from /usr/include/c++/6.1.1/string:40,
                 from /usr/include/boost/thread/exceptions.hpp:20,
                 from /usr/include/boost/thread/pthread/thread_data.hpp:10,
                 from /usr/include/boost/thread/thread_only.hpp:17,
                 from /usr/include/boost/thread/thread.hpp:12,
                 from /usr/include/boost/thread.hpp:13,
                 from tophat_reports.cpp:19:
/usr/include/c++/6.1.1/bits/stl_pair.h:425:5: note: candidate: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
     make_pair(_T1&& __x, _T2&& __y)
     ^~~~~~~~~
/usr/include/c++/6.1.1/bits/stl_pair.h:425:5: note:   template argument deduction/substitution failed:
tophat_reports.cpp:2708:128: note:   cannot convert ‘junction_stat’ (type ‘JunctionStats’) to type ‘JunctionStats&&’
     gtf_junctions.insert(make_pair<Junction, JunctionStats>(Junction(ref_id, left_coord, right_coord, antisense), junction_stat));
                                                                                                                                ^
Makefile:1421: recipe for target 'tophat_reports.o' failed
mbparsa commented 7 years ago

@wookietreiber: I am having hard time running unit test , would appreciate if you can let me know which version with what changes should I use in order to get the unit test up and running? perhaps IDE name and version which is suitable for CppUnit.

wookietreiber commented 7 years ago

@mbparsa What unit test? I'm not a tophat dev, sorry, I don't know what you're talking about.

mbparsa commented 7 years ago

@wookietreiber : I thought you might be able to help, since I can't get any response from the main developers. The unit test inside tests folder. I am trying to import the repository into NetBeans +UnitTest

wookietreiber commented 7 years ago

I have just worked with the release tarballs from here. These don't include tests.

mbparsa commented 7 years ago

@wookietreiber ok, thanks

SoapGentoo commented 7 years ago

Using std::make_pair with explicit template arguments is self-defeating - the only reason you would use make_pair is to actually have argument type deduction (http://www.advogato.org/person/redi/diary.html?start=239 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43785).

wookietreiber commented 7 years ago

@SoapGentoo Yes, indeed.

Thus, please merge :)

SoapGentoo commented 7 years ago

@wookietreiber I would love to 😄 , but I'm not a maintainer, just pitching in that we're having the same problem in Gentoo.