distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
dummyDeleter.hpp
Go to the documentation of this file.
1 
12 #ifndef INCLUDE_DISTORTOS_INTERNAL_MEMORY_DUMMYDELETER_HPP_
13 #define INCLUDE_DISTORTOS_INTERNAL_MEMORY_DUMMYDELETER_HPP_
14 
15 #include <type_traits>
16 
17 namespace distortos
18 {
19 
20 namespace internal
21 {
22 
23 /*---------------------------------------------------------------------------------------------------------------------+
24 | global functions' declarations
25 +---------------------------------------------------------------------------------------------------------------------*/
26 
37 template<typename T, typename U>
38 void dummyDeleter(U*)
39 {
40  static_assert(std::is_trivially_destructible<T>::value == true,
41  "internal::dummyDeleter() cannot be used with types that are not trivially destructible!");
42 }
43 
44 } // namespace internal
45 
46 } // namespace distortos
47 
48 #endif // INCLUDE_DISTORTOS_INTERNAL_MEMORY_DUMMYDELETER_HPP_
Top-level namespace of distortos project.
Definition: buttons.hpp:33
void dummyDeleter(U *)
A "no-op" dummy deleter that can be used with std::unique_ptr and automatic storage that is trivially...
Definition: dummyDeleter.hpp:38