MRPT  1.9.9
is_defined.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <type_traits> // enable_if_t
12 
13 namespace mrpt
14 {
15 /** Checks if type is defined (fails for forward declarations).
16  * \note Credits: WindyFields https://stackoverflow.com/a/45594334/1631514
17  */
18 template <class T, class Enable = void>
19 struct is_defined
20 {
21  static constexpr bool value = false;
22 };
23 template <class T>
24 struct is_defined<T, std::enable_if_t<(sizeof(T) > 0)>>
25 {
26  static constexpr bool value = true;
27 };
28 
29 template <class T>
30 inline constexpr bool is_defined_v = is_defined<T>::value;
31 
32 } // namespace mrpt
STL namespace.
constexpr bool is_defined_v
Definition: is_defined.h:30
Checks if type is defined (fails for forward declarations).
Definition: is_defined.h:19
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
GLsizei const GLfloat * value
Definition: glext.h:4134



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 45d659fbb Tue Dec 10 18:21:14 2019 +0100 at mar dic 10 18:30:09 CET 2019