FastArduino  v1.8
C++ library to build fast but small Arduino/AVR projects
types_traits.h File Reference

Useful traits for common types. More...

#include <stddef.h>
#include <stdint.h>
#include "defines.h"
Include dependency graph for types_traits.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  types_traits::Type_trait< T >
 This trait allows static checks (at compile-time) of properties of various types. More...
struct  types_traits::derives_from< T, B >
 Utility class that checks, at compile-time, that type T is a subtype of type B. More...
struct  types_traits::remove_reference< T >
 Remove a reference from the given type. More...


 Defines traits and utility methods for standard types, like uint16_t.


template<typename T >
static constexpr bool types_traits::is_uint8_or_uint16 ()
 Check if a given type is uint8_t or uint16_t. More...

Detailed Description

Useful traits for common types.

These can be used in various template classes to ensure parameter types are acceptable or not (with static_assert()).

Definition in file types_traits.h.