VCCC  2024.05
VisualCamp Common C++ library
return_category.hpp
Go to the documentation of this file.
1 //
2 // Created by yonggyulee on 2023/12/24.
3 //
4 
5 #ifndef VCCC_TYPE_TRAITS_DETAIL_RETURN_CATEGORY_HPP_
6 #define VCCC_TYPE_TRAITS_DETAIL_RETURN_CATEGORY_HPP_
7 
8 #include <type_traits>
9 
10 namespace vccc {
11 namespace detail {
12 
13 template<int v, typename...>
14 struct return_category : std::integral_constant<int, v> {};
15 
16 template<int v, typename R>
17 struct return_category<v, R> : std::integral_constant<int, v> {
18  using return_type = R;
19 };
20 
21 
22 } // namespace vccc
23 } // namespace detail
24 
25 #endif // VCCC_TYPE_TRAITS_DETAIL_RETURN_CATEGORY_HPP_
Definition: directory.h:12