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: sanitize_string.cpp:15
const std::string s2
Definition: short_seq_map_run.cpp:18
const std::string s1
Definition: short_seq_map_run.cpp:17
bool operator()(std::basic_string< charT, traits, Allocator > const &s1, const boost::basic_string_ref< charT, traits > s2) const
Definition: string_ref.hpp:25
Main namespace of vdj_pipe library.
Definition: keywords_variable.hpp:11
std::size_t hash_value(basic_string_ref< charT, traits > const &str)
Definition: string_ref.hpp:15
Definition: string_ref.hpp:23
bool operator()(const boost::basic_string_ref< charT, traits > s1, std::basic_string< charT, traits, Allocator > const &s2) const
Definition: string_ref.hpp:31