Remove CDS_RVALUE_SUPPORT, CDS_MOVE_SEMANTICS_SUPPORT macros and emulating code
[libcds.git] / cds / details / void_selector.h
1 //$$CDS-header$$
2
3 #ifndef __CDS_DETAILS_VOID_SELECTOR_H
4 #define __CDS_DETAILS_VOID_SELECTOR_H
5
6 #include <type_traits>
7
8 namespace cds {
9     namespace details {
10
11         /// Void type selector
12         /**
13             This metafunction is equal to the following expression:
14             \code
15             std::conditional< std::is_same< T, void >::value, Void, NoVoid >::type
16             \endcode
17
18             The \p NoVoid is optional, default is \p NoVoid == T
19         */
20         template <typename T, typename Void, typename NoVoid = T>
21         struct void_selector: public std::conditional< std::is_same< T, void >::value, Void, NoVoid >
22         {};
23
24     }    // namespace details
25 } // namespace cds
26
27 #endif // #ifndef __CDS_DETAILS_VOID_SELECTOR_H