charimpl
Notice: this software is incomplete and will not be updated because it cannot be reasonably extended to many non-ascii codepages since compilers still cannot properly digest such source code.
Compile-time header-only char implementation checking for C++03/11/14/17/20
| charimpl/ | 2.5K | download | |
| charimpl.hpp | 1.4K | view | download |
| impl/ | 2.4K | download | |
| ascii.hpp | 6.5K | view | download |
| ebcdic.hpp | 5.8K | view | download |
| ebcdic037.hpp | 2.1K | view | download |
| ebcdic1047.hpp | 2.1K | view | download |
| ebcdic273.hpp | 2.1K | view | download |
Example
#include <iostream>
#include <charimpl/charimpl.hpp>
int main() {
std::cout << std::boolalpha
<< charimpl::is_ascii() << std::endl
<< charimpl::is_ebcdic() << std::endl
<< charimpl::is_ebcdic037() << std::endl
<< charimpl::is_ebcdic1047() << std::endl;
}All functions are marked as consteval/constexpr and noexcept if allowed by the compiler.
bool charimpl::is_ascii(); // Returns true if ASCII encoding is currently in use, false otherwise
bool charimpl::is_ebcdic(); // Returns true if any form of EBCDIC encoding is currently in use, false otherwise
bool charimpl::is_ebcdic037(); // Returns true if EBCDIC037/IBM037 encoding is currently in use, false otherwise
bool charimpl::is_ebcdic273(); // Returns true if EBCDIC273/IBM037 encoding is currently in use, false otherwise
bool charimpl::is_ebcdic1047(); // Returns true if EBCDIC1047/IBM1047 encoding is currently in use, false otherwise
CHARIMPL_ASCII_EXPR // Macro which expands to an expression equal to the result of charimpl::is_ascii()
CHARIMPL_EBCDIC_EXPR // Macro which expands to an expression equal to the result of charimpl::is_ebcdic()
CHARIMPL_EBCDIC037_EXPR // Macro which expands to an expression equal to the result of charimpl::is_ebcdic037()
CHARIMPL_EBCDIC273_EXPR // Macro which expands to an expression equal to the result of charimpl::is_ebcdic273()
CHARIMPL_EBCDIC1047_EXPR // Macro which expands to an expression equal to the result of charimpl::is_ebcdic1047()