Prefer logical punctuators instead of named operator keywords

Some compilers (eg. MSVC) still require inclusion of <ciso646>
in order to import named operator keywords.
It is easier to stick with traditional punctuators.
This commit is contained in:
Mateusz Loskot
2018-02-14 01:10:02 +01:00
committed by Patrick Niklaus
parent 342da81591
commit ae41066fbe
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -96,7 +96,7 @@ class FileReader
/* Read count objects of type T into pointer dest */
template <typename T> void ReadInto(T *dest, const std::size_t count)
{
#if not defined __GNUC__ or __GNUC__ > 4
#if !defined(__GNUC__) || (__GNUC__ > 4)
static_assert(!std::is_pointer<T>::value, "saving pointer types is not allowed");
static_assert(std::is_trivially_copyable<T>::value,
"bytewise reading requires trivially copyable type");
@@ -214,7 +214,7 @@ class FileWriter
/* Write count objects of type T from pointer src to output stream */
template <typename T> void WriteFrom(const T *src, const std::size_t count)
{
#if not defined __GNUC__ or __GNUC__ > 4
#if !defined(__GNUC__) || (__GNUC__ > 4)
static_assert(std::is_trivially_copyable<T>::value,
"bytewise writing requires trivially copyable type");
#endif