Fixed not implemented compiler error

This commit is contained in:
BlackMark 2019-07-28 10:35:11 +02:00
parent f9c34b09ba
commit f08f607265

View File

@ -9,6 +9,15 @@
namespace uart { namespace uart {
namespace detail {
template <typename...>
struct always_false {
static constexpr auto value = false;
};
} // namespace detail
template <class Impl> template <class Impl>
class uart { class uart {
public: public:
@ -72,157 +81,187 @@ class uart {
return *this; return *this;
} }
template <typename... Ts>
uart &operator<<(char) uart &operator<<(char)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator<<(unsigned char) uart &operator<<(unsigned char)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator<<(short) uart &operator<<(short)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator<<(unsigned short) uart &operator<<(unsigned short)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator<<(int) uart &operator<<(int)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator<<(unsigned int) uart &operator<<(unsigned int)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator<<(long) uart &operator<<(long)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator<<(unsigned long) uart &operator<<(unsigned long)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator<<(long long) uart &operator<<(long long)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator<<(unsigned long long) uart &operator<<(unsigned long long)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator<<(float) uart &operator<<(float)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator<<(double) uart &operator<<(double)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator<<(long double) uart &operator<<(long double)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator<<(bool) uart &operator<<(bool)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator<<(const void *) uart &operator<<(const void *)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// Input stream overloads // Input stream overloads
template <typename... Ts>
uart &operator>>(char &) uart &operator>>(char &)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator>>(unsigned char &) uart &operator>>(unsigned char &)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator>>(short &) uart &operator>>(short &)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator>>(unsigned short &) uart &operator>>(unsigned short &)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator>>(int &) uart &operator>>(int &)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator>>(unsigned int &) uart &operator>>(unsigned int &)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator>>(long &) uart &operator>>(long &)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator>>(unsigned long &) uart &operator>>(unsigned long &)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator>>(long long &) uart &operator>>(long long &)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator>>(unsigned long long &) uart &operator>>(unsigned long long &)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator>>(float &) uart &operator>>(float &)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator>>(double &) uart &operator>>(double &)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator>>(long double &) uart &operator>>(long double &)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator>>(bool &) uart &operator>>(bool &)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
template <typename... Ts>
uart &operator>>(const void *&) uart &operator>>(const void *&)
{ {
static_assert(true, "Not implemented"); static_assert(detail::always_false<Ts...>::value, "Not implemented");
} }
}; };