PStack  2.0
Stack trace printer for MSVC and GCC binaries
type_traits.hpp
Go to the documentation of this file.
1 // ===-- include/psystem/framework/type_traits.hpp -------- -*- C++ -*- --=== //
2 // Copyright (c) 2014 Matt Bisson. All rights reserved.
3 
19 #pragma once
20 #ifndef PSYSTEM_FRAMEWORK_TYPE_TRAITS_HPP
21 #define PSYSTEM_FRAMEWORK_TYPE_TRAITS_HPP
22 
23 #include "platform.hpp"
24 
25 #include <type_traits>
26 
27 namespace psystem {
28 
45 template <typename T> struct has_void_return_type;
46 
48 
49 /* This is part of the logic of the template metafunction. We don't need to add
50  * this to the generated documentation.
51  */
52 template <typename... Args>
53 struct has_void_return_type<void(Args...)> : public std::true_type {};
54 template <typename R, typename... Args>
55 struct has_void_return_type<R(Args...)> : public std::false_type {};
56 
57 #ifdef _MSC_VER
58 # if 0 // Something else??
59 // Annoyingly, Win32 calling conventions cause these not to match the type
60 // specialization...
61 template <typename... Args>
62 struct has_void_return_type<void __stdcall(Args...)> : public std::true_type {};
63 template <typename R, typename... Args>
64 struct has_void_return_type<R __stdcall(Args...)> : public std::false_type {};
65 # endif
66 #endif
67 
69 
70 } // namespace psystem
71 
72 #endif // PSYSTEM_FRAMEWORK_TYPE_TRAITS_HPP
Master header file for Platform-wide declarations.
Contains the process examination "system" and basic frameworks.
Definition: pstack_event_handler.hpp:28
A template metafunction to determine if T is a function with a void return type.
Definition: type_traits.hpp:45