GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - igoz0/charimpl: Compile-time header-only char implementation checking for C++03/11/14/17/20

This repository was archived by the owner on Sep 21, 2026. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
include/charimpl
include/charimpl
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

charimpl

Compile-time header-only char implementation checking for C++03/11/14/17/20

license release godbolt

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()

Note: Macros should be surrounded with parentheses when used in larger statements in order to avoid potential issues with operator precedence

About

Compile-time header-only char implementation checking for C++03/11/14/17/20

Topics

compile-timecppcpp03cpp11cpp14cpp17cpp20header-onlymodern-cppno-dependencies

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.