Fixed not implemented compiler error
This commit is contained in:
parent
f9c34b09ba
commit
f08f607265
99
uart.hpp
99
uart.hpp
@ -9,6 +9,15 @@
|
||||
|
||||
namespace uart {
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <typename...>
|
||||
struct always_false {
|
||||
static constexpr auto value = false;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <class Impl>
|
||||
class uart {
|
||||
public:
|
||||
@ -72,157 +81,187 @@ class uart {
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(char)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(unsigned char)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(short)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(unsigned short)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(int)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(unsigned int)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(long)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
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)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
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)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(double)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(long double)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(bool)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator<<(const void *)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Input stream overloads
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(char &)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(unsigned char &)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(short &)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(unsigned short &)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(int &)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(unsigned int &)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(long &)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
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 &)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
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 &)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(double &)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(long double &)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(bool &)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
uart &operator>>(const void *&)
|
||||
{
|
||||
static_assert(true, "Not implemented");
|
||||
static_assert(detail::always_false<Ts...>::value, "Not implemented");
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user