vdj_pipe
pipeline for processing DNA sequence data
string_ref.hpp
Go to the documentation of this file.
1 
7 #ifndef STRING_REF_HPP_
8 #define STRING_REF_HPP_
9 #include "boost/utility/string_ref.hpp"
10 #include "boost/functional/hash_fwd.hpp"
11 
12 namespace boost{
13 
14 template<typename charT, typename traits>
15 inline std::size_t hash_value(basic_string_ref<charT,traits> const& str) {
16  return boost::hash_range(str.begin(), str.end());
17 }
18 
19 }//namespace boost
20 
21 namespace vdj_pipe{ namespace detail{
22 
24  template<typename charT, typename traits, typename Allocator>
25  bool operator()(
26  std::basic_string<charT, traits, Allocator> const& s1,
27  const boost::basic_string_ref<charT,traits> s2
28  ) const {return s1 == s2;}
29 
30  template<typename charT, typename traits, typename Allocator>
31  bool operator()(
32  const boost::basic_string_ref<charT,traits> s1,
33  std::basic_string<charT, traits, Allocator> const& s2
34  ) const {return s1 == s2;}
35 };
36 
37 }//namespace detail
38 }//namespace vdj_pipe
39 #endif /* STRING_REF_HPP_ */
Definition: sequence_interval.hpp:58
Main namespace of vdj_pipe library.
Definition: sequence_file.hpp:14
Definition: string_ref.hpp:23