diff --git a/include/utl/com/_1wire.h b/include/utl/com/_1wire.h index 7dad5f9..55cb026 100644 --- a/include/utl/com/_1wire.h +++ b/include/utl/com/_1wire.h @@ -21,10 +21,10 @@ #ifndef __utl_com_1wire_h__ #define __utl_com_1wire_h__ -#include -#include -#include +#include +#include #include +#include namespace utl { @@ -681,27 +681,27 @@ namespace _1wire_i_det { //! Primary template to catch any non 1-wire interface types template - struct is_1wire_ : false_ {}; + struct is_1wire_ : meta::false_ {}; //! template to catch a proper 1-wire interface type template struct is_1wire_ <_Tp, - void_t < + meta::void_t < // typename _Tp::Speed, // typename _Tp::Command, - use_if_same_t , bool>, - use_if_same_t , byte_t>, - //use_if_same_t , size_t>, - use_if_same_t , byte_t>, - //use_if_same_t , size_t>, - use_if_same_t , void>, - use_if_same_t , void>, - use_if_same_t , void>, - use_if_same_t , void>, - use_if_same_t , _1wire_id_t>, - use_if_same_t , _1wire_id_t> + meta::use_if_same_t , bool>, + meta::use_if_same_t , byte_t>, + //meta::use_if_same_t , size_t>, + meta::use_if_same_t , byte_t>, + //meta::use_if_same_t , size_t>, + meta::use_if_same_t , void>, + meta::use_if_same_t , void>, + meta::use_if_same_t , void>, + meta::use_if_same_t , void>, + meta::use_if_same_t , _1wire_id_t>, + meta::use_if_same_t , _1wire_id_t> > //!^ SFINAE may apply - > : true_ {}; + > : meta::true_ {}; } // namespace _1wire_i_det /*! diff --git a/include/utl/com/_1wire_id.h b/include/utl/com/_1wire_id.h index d3ca3d4..e655246 100644 --- a/include/utl/com/_1wire_id.h +++ b/include/utl/com/_1wire_id.h @@ -21,7 +21,7 @@ #ifndef __utl_com_1wire_id_h__ #define __utl_com_1wire_id_h__ -#include +#include #include namespace utl { diff --git a/include/utl/com/_1wire_uart.h b/include/utl/com/_1wire_uart.h index 18876ab..ec75d49 100644 --- a/include/utl/com/_1wire_uart.h +++ b/include/utl/com/_1wire_uart.h @@ -29,8 +29,8 @@ #ifndef __utl_com_1wire_uart_h__ #define __utl_com_1wire_uart_h__ -#include -#include +#include +#include #include namespace utl { diff --git a/include/utl/com/i2c.h b/include/utl/com/i2c.h index f04af8a..3d6b35e 100644 --- a/include/utl/com/i2c.h +++ b/include/utl/com/i2c.h @@ -21,9 +21,9 @@ #ifndef _utl_com_i2c_h__ #define _utl_com_i2c_h__ -#include -#include -#include +#include +#include +#include namespace utl { @@ -254,21 +254,21 @@ namespace utl { //! Primary template to catch any non I2C interface types template - struct is_i2c_ : false_ { }; + struct is_i2c_ : meta::false_ { }; //! template to catch a proper I2C interface type template struct is_i2c_ <_Tp, - void_t < + meta::void_t < typename _Tp::Sequence, - use_if_same_t >, - use_if_same_t >, - use_if_same_t >, - use_if_same_t >, - use_if_same_t >, - use_if_same_t > + meta::use_if_same_t >, + meta::use_if_same_t >, + meta::use_if_same_t >, + meta::use_if_same_t >, + meta::use_if_same_t >, + meta::use_if_same_t > > - > : true_ { }; + > : meta::true_ { }; } /*! * Value meta-programming function alias for I2C interface checking diff --git a/include/utl/com/i2c_bb.h b/include/utl/com/i2c_bb.h index a832c25..9110b46 100644 --- a/include/utl/com/i2c_bb.h +++ b/include/utl/com/i2c_bb.h @@ -22,8 +22,8 @@ #ifndef __utl_com_i2c_bb_h__ #define __utl_com_i2c_bb_h__ -#include -#include +#include +#include #include diff --git a/include/utl/com/spi.h b/include/utl/com/spi.h index 43d87ea..72dfc04 100644 --- a/include/utl/com/spi.h +++ b/include/utl/com/spi.h @@ -21,9 +21,9 @@ #ifndef _utl_com_spi_h__ #define _utl_com_spi_h__ -#include -#include -#include +#include +#include +#include namespace utl { @@ -302,19 +302,19 @@ namespace utl { //! Primary template to catch any non SPI interface types template - struct is_spi_ : false_ {}; + struct is_spi_ : meta::false_ {}; //! template to catch a proper SPI interface type template struct is_spi_ < _Tp, - void_t < - use_if_same_t , uint32_t>, - use_if_same_t , void>, - use_if_same_t , byte_t>, - use_if_same_t , byte_t> + meta::void_t < + meta::use_if_same_t , uint32_t>, + meta::use_if_same_t , void>, + meta::use_if_same_t , byte_t>, + meta::use_if_same_t , byte_t> > - > : true_ {}; + > : meta::true_ {}; } /*! * Value meta-programming function for SPI interface checking diff --git a/include/utl/com/spi_bb.h b/include/utl/com/spi_bb.h index 90f5878..45bacce 100644 --- a/include/utl/com/spi_bb.h +++ b/include/utl/com/spi_bb.h @@ -22,10 +22,10 @@ #ifndef __utl_com_spi_bb_h__ #define __utl_com_spi_bb_h__ -#include -#include -#include +#include +#include #include +#include namespace utl { @@ -75,9 +75,9 @@ namespace utl { //! \name SPI implementation specific functions //!@{ template constexpr - use_if_t <(B == spi::bitOrder::LSB_First), void> shift (byte_t& b) { b <<=1; } + meta::use_if_t <(B == spi::bitOrder::LSB_First), void> shift (byte_t& b) { b <<=1; } template constexpr - use_if_t <(B == spi::bitOrder::MSB_First), void> shift (byte_t& b) { b >>=1; } + meta::use_if_t <(B == spi::bitOrder::MSB_First), void> shift (byte_t& b) { b >>=1; } template static constexpr bool clkHigh () { return !static_cast(C); } @@ -113,9 +113,9 @@ namespace utl { byte_t _tx_data (byte_t out) { return _tx_data_impl (out); } template - use_if_t <(C == spi::cpha::LOW), byte_t> _tx_data_impl (byte_t out); + meta::use_if_t <(C == spi::cpha::LOW), byte_t> _tx_data_impl (byte_t out); template - use_if_t <(C == spi::cpha::HIGH), byte_t> _tx_data_impl (byte_t out); + meta::use_if_t <(C == spi::cpha::HIGH), byte_t> _tx_data_impl (byte_t out); //!@} //! Data members @@ -134,7 +134,7 @@ namespace utl { */ template template - use_if_t <(C == spi::cpha::LOW), byte_t> + meta::use_if_t <(C == spi::cpha::LOW), byte_t> spi_bb_i::_tx_data_impl (byte_t out) { byte_t in {}; SCLK (clkL_); @@ -158,7 +158,7 @@ namespace utl { */ template template - use_if_t <(C == spi::cpha::HIGH), byte_t> + meta::use_if_t <(C == spi::cpha::HIGH), byte_t> spi_bb_i::_tx_data_impl (byte_t out) { byte_t in {}; SCLK (clkL_); @@ -207,9 +207,9 @@ namespace utl { //! \name SPI implementation specific functions //!@{ template constexpr - use_if_t <(B == spi::bitOrder::LSB_First), void> shift (byte_t& b) { b <<=1; } + meta::use_if_t <(B == spi::bitOrder::LSB_First), void> shift (byte_t& b) { b <<=1; } template constexpr - use_if_t <(B == spi::bitOrder::MSB_First), void> shift (byte_t& b) { b >>=1; } + meta::use_if_t <(B == spi::bitOrder::MSB_First), void> shift (byte_t& b) { b >>=1; } template static constexpr bool clkHigh () { return !static_cast(C); } @@ -241,9 +241,9 @@ namespace utl { byte_t _tx_data (byte_t out) final { return _tx_data_impl (out); } template - use_if_t <(C == spi::cpha::LOW), byte_t> _tx_data_impl (byte_t out); + meta::use_if_t <(C == spi::cpha::LOW), byte_t> _tx_data_impl (byte_t out); template - use_if_t <(C == spi::cpha::HIGH), byte_t> _tx_data_impl (byte_t out); + meta::use_if_t <(C == spi::cpha::HIGH), byte_t> _tx_data_impl (byte_t out); //!@} //! Data members @@ -262,7 +262,7 @@ namespace utl { */ template template - use_if_t <(C == spi::cpha::LOW), byte_t> + meta::use_if_t <(C == spi::cpha::LOW), byte_t> spi_bb_i::_tx_data_impl (byte_t out) { byte_t in {}; SCLK (clkL_); @@ -286,7 +286,7 @@ namespace utl { */ template template - use_if_t <(C == spi::cpha::HIGH), byte_t> + meta::use_if_t <(C == spi::cpha::HIGH), byte_t> spi_bb_i::_tx_data_impl (byte_t out) { byte_t in {}; SCLK (clkL_); diff --git a/include/utl/container/array.h b/include/utl/container/array.h index 55513b5..6987d05 100644 --- a/include/utl/container/array.h +++ b/include/utl/container/array.h @@ -21,7 +21,7 @@ #ifndef __utl_container_array_h__ #define __utl_container_array_h__ -#include +#include #include namespace utl { diff --git a/include/utl/container/id.h b/include/utl/container/id.h index cd40256..2496425 100644 --- a/include/utl/container/id.h +++ b/include/utl/container/id.h @@ -22,7 +22,7 @@ #ifndef __utl_container_id_h__ #define __utl_container_id_h__ -#include +#include #include #include diff --git a/include/utl/core/crtp.h b/include/utl/core/crtp.h index fde5d77..e67cfad 100644 --- a/include/utl/core/crtp.h +++ b/include/utl/core/crtp.h @@ -21,7 +21,7 @@ #ifndef __utl_impl_crtp_h__ #define __utl_impl_crtp_h__ -#include +#include /*! * \defgroup crtp CRTP idiom support header diff --git a/include/utl/core/impl.h b/include/utl/core/impl.h index 8346a52..7715154 100644 --- a/include/utl/core/impl.h +++ b/include/utl/core/impl.h @@ -1,6 +1,6 @@ /*! - * \file /utl/impl/impl.h - * \brief Implementation detail main header + * \file /utl/core/impl.h + * \brief Implementation detail main forward header * * Copyright (C) 2018 Christos Choutouridis * @@ -18,17 +18,13 @@ * along with this program. If not, see . * */ -#ifndef __utl_impl_impl_h__ -#define __utl_impl_impl_h__ +#ifndef __utl_core_impl_h__ +#define __utl_core_impl_h__ -// Include implementation details once -#include -#include -#include +// FWD include implementation details once +#include +#include -// STL dependency -#include - -#endif /* __utl_impl_impl_h__ */ +#endif /* __utl_core_impl_h__ */ diff --git a/include/utl/core/types.h b/include/utl/core/types.h index 8f614ba..909fc90 100644 --- a/include/utl/core/types.h +++ b/include/utl/core/types.h @@ -1,5 +1,5 @@ /*! - * \file /utl/impl/types.h + * \file /utl/core/types.h * \brief Basic type alias support * * Copyright (C) 2018 Christos Choutouridis @@ -18,15 +18,25 @@ * along with this program. If not, see . * */ -#ifndef __utl_impl_types_h__ -#define __utl_impl_types_h__ +#ifndef __utl_core_types_h__ +#define __utl_core_types_h__ -#include +#include +#include +namespace utl { + //! @{ \name byte and word types + using byte_t = uint8_t; //!< 8 bits wide + using word_t = uint16_t; //!< 16 bits wide + using dword_t = uint32_t; //!< 32 bits wide + //! @} -typedef uint8_t byte_t; /*!< 8 bits wide */ -typedef uint16_t word_t; /*!< 16 bits wide */ -typedef uint32_t dword_t; /*!< 32 bits wide */ + //! @{ \name size and index + using size_t = std::size_t; + using index_t = size_t; //!< index_t and size_t mend to be interchangeable + using ptrdiff_t= std::ptrdiff_t; + //! @} +} -#endif /* __utl_impl_types_h__ */ +#endif /* __utl_core_types_h__ */ diff --git a/include/utl/core/version.h b/include/utl/core/version.h index 49c52fc..cdfc488 100755 --- a/include/utl/core/version.h +++ b/include/utl/core/version.h @@ -1,6 +1,6 @@ /*! - * \file /utl/impl/version.h - * \brief version and cpp version check + * \file /utl/core/version.h + * \brief version and cpp version checks * * Copyright (C) 2018 Christos Choutouridis * @@ -18,23 +18,88 @@ * along with this program. If not, see . * */ -#ifndef __utl_impl_version_h__ -#define __utl_impl_version_h__ +#ifndef __utl_core_version_h__ +#define __utl_core_version_h__ //!\defgroup version version //! Definitions of the utl version -//!\ingroup impl +//!@{ -#define UTL_VERSION "0.0.0" +//! utl version +#define UTL_VERSION "0.0.1" #define UTL_VERSION_MAJOR 0 #define UTL_VERSION_MINOR 0 -#define UTL_VERSION_PATCH 0 +#define UTL_VERSION_PATCH 1 #define UTL_VERSION_VALUE ( (UTL_VERSION_MAJOR * 10000) \ + (UTL_VERSION_MINOR * 100) \ + UTL_VERSION_PATCH) -#if __cplusplus < 201103L +//! C++ versions +#define CXX_VER __cplusplus +#define CXX_VER_STD_11 201103L +#define CXX_VER_STD_14 201402L +#define CXX_VER_STD_17 201703L + +//#include + +//! Check for variable templates +#ifndef CXX_VARIABLE_TEMPLATES + #ifdef __cpp_variable_templates + #define CXX_VARIABLE_TEMPLATES __cpp_variable_templates + #else + #define CXX_VARIABLE_TEMPLATES (CXX_VER >= CXX_VER_STD_14) + #endif +#endif + +//! Check integer sequence +#ifndef CXX_INTEGER_SEQUENCE + #ifdef __cpp_lib_integer_sequence + #define CXX_INTEGER_SEQUENCE __cpp_lib_integer_sequence + #else + #define CXX_INTEGER_SEQUENCE (CXX_VER >= CXX_VER_STD_14) + #endif +#endif + +//! Check concepts +#ifndef CXX_CONCEPTS + #ifdef __cpp_concepts + #define CXX_CONCEPTS __cpp_concepts + #else + #define CXX_CONCEPTS 0 + #endif +#endif + +//! Check for inline variables +#ifndef CXX_INLINE_VARIABLES + #ifdef __cpp_inline_variables + #define CXX_INLINE_VARIABLES __cpp_inline_variables + #else + #define CXX_INLINE_VARIABLES (CXX_VER >= CXX_VER_STD_17) + #endif +#endif + +#ifndef CXX_FOLD_EXPRESSIONS + #ifdef __cpp_fold_expressions + #define CXX_FOLD_EXPRESSIONS __cpp_fold_expressions + #else + #define CXX_FOLD_EXPRESSIONS (CXX_VER >= CXX_VER_STD_17) + #endif +#endif + + +/* + * Workaround inspection + */ +#if defined(__GNUC__) && (__GNUC__ < 5) + // https://wg21.link/cwg1558 + #define UTL_WORKAROUND_CWG_1558 +#endif + + +//! Base library requirement +#if __cplusplus < CXX_VER_STD_11 #error "uTL requires C++11" #endif -#endif /* __utl_impl_version_h__ */ +//!@} +#endif /* #ifndef __utl_core_version_h__ */ diff --git a/include/utl/dev/dev_iterators.h b/include/utl/dev/dev_iterators.h index bda07b3..e417730 100644 --- a/include/utl/dev/dev_iterators.h +++ b/include/utl/dev/dev_iterators.h @@ -278,23 +278,23 @@ namespace utl { //! Primary template to catch any non SPI interface types template - struct is_outdev_it_ : false_ {}; + struct is_outdev_it_ : meta::false_ {}; //! template to catch a proper SPI interface type template struct is_outdev_it_ < _Tp, - void_t < - typename T::value_type, - typename T::difference_type, - typename T::pointer, - typename T::reference, - use_if_same_t < - typename T::iterator_category, + meta::void_t < + typename _Tp::value_type, + typename _Tp::difference_type, + typename _Tp::pointer, + typename _Tp::reference, + meta::use_if_same_t < + typename _Tp::iterator_category, std::output_iterator_tag > > - > : true_ {}; + > : meta::true_ {}; } /*! * Value meta-programming function for SPI interface checking @@ -525,23 +525,23 @@ namespace utl { //! Primary template to catch any non SPI interface types template - struct is_indev_it_ : false_ {}; + struct is_indev_it_ : meta::false_ {}; //! template to catch a proper SPI interface type template struct is_indev_it_ < _Tp, - void_t < - typename T::value_type, - typename T::difference_type, - typename T::pointer, - typename T::reference, - use_if_same_t < - typename T::iterator_category, + meta::void_t < + typename _Tp::value_type, + typename _Tp::difference_type, + typename _Tp::pointer, + typename _Tp::reference, + meta::use_if_same_t < + typename _Tp::iterator_category, std::input_iterator_tag > > - > : true_ {}; + > : meta::true_ {}; } /*! * Value meta-programming function for SPI interface checking @@ -821,23 +821,23 @@ namespace utl { //! Primary template to catch any non SPI interface types template - struct is_idxdev_it_ : false_ {}; + struct is_idxdev_it_ : meta::false_ {}; //! template to catch a proper SPI interface type template struct is_idxdev_it_ < _Tp, - void_t < - typename T::value_type, - typename T::difference_type, - typename T::pointer, - typename T::reference, - use_if_same_t < - typename T::iterator_category, + meta::void_t < + typename _Tp::value_type, + typename _Tp::difference_type, + typename _Tp::pointer, + typename _Tp::reference, + meta::use_if_same_t < + typename _Tp::iterator_category, std::input_iterator_tag > > - > : true_ {}; + > : meta::true_ {}; } /*! * Value meta-programming function for SPI interface checking diff --git a/include/utl/dev/idx_dev.h b/include/utl/dev/idx_dev.h index 4e719e1..6a27c12 100644 --- a/include/utl/dev/idx_dev.h +++ b/include/utl/dev/idx_dev.h @@ -22,10 +22,10 @@ #ifndef __utl_dev_idx_dev_h__ #define __utl_dev_idx_dev_h__ -#include -#include -#include +#include +#include #include +#include namespace utl { diff --git a/include/utl/dev/in_dev.h b/include/utl/dev/in_dev.h index 4cd7a47..8e615d7 100644 --- a/include/utl/dev/in_dev.h +++ b/include/utl/dev/in_dev.h @@ -21,10 +21,10 @@ #ifndef __utl_dev_in_dev_h__ #define __utl_dev_in_dev_h__ -#include -#include -#include +#include +#include #include +#include namespace utl { diff --git a/include/utl/dev/inbuf_dev.h b/include/utl/dev/inbuf_dev.h index db4f36a..dd45dcf 100644 --- a/include/utl/dev/inbuf_dev.h +++ b/include/utl/dev/inbuf_dev.h @@ -22,10 +22,10 @@ #ifndef __utl_dev_inbuf_dev_h__ #define __utl_dev_inbuf_dev_h__ -#include -#include -#include +#include +#include #include +#include namespace utl { diff --git a/include/utl/meta/bool.h b/include/utl/meta/bool.h deleted file mode 100644 index 5e91e00..0000000 --- a/include/utl/meta/bool.h +++ /dev/null @@ -1,48 +0,0 @@ -/*! - * \file bool.h - * \brief Template meta-programming bool integral constant - * - * Copyright (C) 2018 Christos Choutouridis - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ -#ifndef __utl_meta_bool_h__ -#define __utl_meta_bool_h__ - -#include -#include - -/*! - * \ingroup meta - * \defgroup bool - * boolean constant type support header - */ -//! @{ - -namespace utl { - - //! bool_ type - template - using bool_ = integral_; - - //! The type used as a compile-time boolean with true value. - typedef bool_ true_; - - //! The type used as a compile-time boolean with false value. - typedef bool_ false_; - -} - -//! @} -#endif /* __utl_meta_bool_h__ */ diff --git a/include/utl/meta/detect.h b/include/utl/meta/detect.h deleted file mode 100644 index 49964a4..0000000 --- a/include/utl/meta/detect.h +++ /dev/null @@ -1,70 +0,0 @@ -/*! - * \file utl/meta/detect.h - * \brief Template meta-programming void helpers - * - * Copyright (C) 2018 Christos Choutouridis - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ -#ifndef __utl_meta_detect_h__ -#define __utl_meta_detect_h__ - -#include -#include - -/*! - * \ingroup meta - * \defgroup detect - * Implementation of the detection idiom - */ -//! @{ - -namespace utl { - - //! detection idiom (negative case). - template class _Op, - typename... _Args> - struct detector_ { - using value_ = false_; - using type = _Def; - }; - - //! detection idiom (positive case). - template class _Op, - typename... _Args> - struct detector_ <_Def, void_t<_Op<_Args...>>, _Op, _Args...> { - using value_ = true_; - using type = _Op<_Args...>; - }; - - // Detect whether _Op<_Args...> is a valid type, use _Def if not. - template class _Op, - typename... _Args> - using detected_or_ = detector_ <_Def, void, _Op, _Args...>; - - // template alias - template class _Op, - typename... _Args> - using detected_or_t = typename detected_or_<_Def, _Op, _Args...>::type; - - - -} -//! @} -#endif /* __utl_meta_detect_h__ */ diff --git a/include/utl/meta/if.h b/include/utl/meta/if.h deleted file mode 100644 index a82a878..0000000 --- a/include/utl/meta/if.h +++ /dev/null @@ -1,59 +0,0 @@ -/*! - * \file if.h - * \brief Template meta-programming conditional helpers - * - * Copyright (C) 2018 Christos Choutouridis - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ -#ifndef __utl_meta_if_h__ -#define __utl_meta_if_h__ - -#include - - -/*! - * \ingroup meta - * \defgroup if - * conditional type support header - */ -//! @{ -namespace utl { - - //! select _T1 or _T2 based on _Sel - //! @{ - template - struct select_ { - typedef _T1 type; - }; - - template - struct select_ { - typedef _T2 type; - }; - //! @} - - //! select _Tp if _Check is true, else SFINAE - //! @{ - template - struct if_ { - typedef _Tp type; - }; - template // Partial specialization for false. - struct if_ { }; - -} - -//! @} -#endif /* __utl_meta_if_h__ */ diff --git a/include/utl/meta/invoke.h b/include/utl/meta/invoke.h deleted file mode 100644 index 2211b47..0000000 --- a/include/utl/meta/invoke.h +++ /dev/null @@ -1,63 +0,0 @@ -/*! - * \file void.h - * \brief Template meta-programming void helpers - * - * Copyright (C) 2018 Christos Choutouridis - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 3 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - */ -#ifndef __utl_meta_void_h__ -#define __utl_meta_void_h__ - -#include -#include - -/*! \ingroup meta - * \defgroup void - * void_ support header - */ -//! @{ - -namespace utl { - - /*! - * Like boost::mpl we made void_ a complete type to allow it to be - * instantiated so that it can be passed in as an object that can be - * used to select an overloaded function. - */ - struct void_ { - typedef void_ type; - }; - - template - struct is_void_ - : false_ { }; - - template<> - struct is_void_ - : true_ { }; - - template - struct is_not_void_ - : true_ { }; - - template<> - struct is_not_void_ - : false_ { }; - -} - -//!@} - -#endif /* __utl_meta_void_h__ */ diff --git a/test/main.cpp b/test/main.cpp index 7bf991a..925e7e0 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -18,12 +18,10 @@ * along with this program. If not, see . * */ -#include -#include +#include GTEST_API_ int main(int argc, char **argv) { - std::cout << "Running tests from main.cpp\n"; testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } diff --git a/test/tests/test_1w_impl.cpp b/test/tests/test_1w_impl.cpp index eae2c9b..8412da9 100644 --- a/test/tests/test_1w_impl.cpp +++ b/test/tests/test_1w_impl.cpp @@ -17,7 +17,7 @@ * along with this program. If not, see . * */ -#include +#include #include /*! diff --git a/test/tests/test_i2c_impl.cpp b/test/tests/test_i2c_impl.cpp index 3fd1d12..4dbd2e5 100644 --- a/test/tests/test_i2c_impl.cpp +++ b/test/tests/test_i2c_impl.cpp @@ -17,7 +17,7 @@ * along with this program. If not, see . * */ -#include +#include #include /*! diff --git a/test/tests/test_spi_impl.cpp b/test/tests/test_spi_impl.cpp index 212920f..ec14d56 100644 --- a/test/tests/test_spi_impl.cpp +++ b/test/tests/test_spi_impl.cpp @@ -17,9 +17,10 @@ * along with this program. If not, see . * */ -#include +#include #include + /*! * \warning * This is not right way of testing communication interfaces. We have to