Skip to content

Commit

Permalink
Endianess checking implemented. Results in compile time error using t…
Browse files Browse the repository at this point in the history
…he #error directive, if a Big Endian platform is detected
  • Loading branch information
monoamine11231 committed Jan 15, 2024
1 parent c1b2b47 commit ceddc0e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MTBase64/MTBase64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
#include <cxxabi.h>
#include <typeinfo>

#include <endian.h>

#if __BYTE_ORDER == __BIG_ENDIAN
#error "Not implemented for big endian platforms!"
#endif

namespace MTBase64 {

enum class ErrorCodeTable
Expand Down

0 comments on commit ceddc0e

Please sign in to comment.