OpenLibrary
traits.hpp
1 
2 /***************************************
3  * Various traits *
4  * Author: MichaƂ Walenciak *
5  * Creation date: 29.09.2012 *
6  ***************************************/
7 
8 #ifndef OPENLIBRARY_A_START_ROUTER_TRAITS_HPP
9 #define OPENLIBRARY_A_START_ROUTER_TRAITS_HPP
10 
11 #include <forward_list>
12 #include <list>
13 #include <deque>
14 
15 #ifdef _MSC_VER
16  #define constexpr const
17 #endif
18 
19 namespace ol
20 {
21  namespace Router
22  {
23  template<class T>
24  struct Container
25  {
26  static constexpr bool prependable = false;
27  };
28 
29 
30  //template<>
31  template<class U>
32  struct Container< std::deque<U> >
33  {
34  static constexpr bool prependable = true;
35  };
36 
37 
38  //template<>
39  template<class U>
40  struct Container< std::list<U> >
41  {
42  static constexpr bool prependable = true;
43  };
44 
45 
46  //template<>
47  template<class U>
48  struct Container< std::forward_list<U> >
49  {
50  static constexpr bool prependable = true;
51  };
52  }
53 }
54 
55 #endif
Definition: debug.hpp:45
Definition: traits.hpp:24