My Project
conditional.hpp
Go to the documentation of this file.
1 
28 #ifndef BSL_CONDITIONAL_HPP
29 #define BSL_CONDITIONAL_HPP
30 
31 namespace bsl
32 {
45  template<bool B, typename T, typename F>
46  struct conditional final
47  {
49  using type = T;
50  };
51 
53  template<bool B, typename T, typename F>
55 
57 
58  template<typename T, typename F>
59  struct conditional<false, T, F> final
60  {
62  using type = F;
63  };
64 
66 }
67 
68 #endif
Provides the member typedef type which is the same as T if B is true, otherwise is the same as F.
Definition: conditional.hpp:46
typename conditional< B, T, F >::type conditional_t
a helper that reduces the verbosity of bsl::conditional
Definition: conditional.hpp:54
T type
provides the member typedef "type"
Definition: conditional.hpp:49