Skip to content

Instantly share code, notes, and snippets.

@CyberDNIWE
CyberDNIWE / toLower.cpp
Created June 18, 2024 06:19 — forked from texus/toLower.cpp
String to lowercase at compile time with with c++14
// This file contains code on how to convert a string to lowercase at compile time.
// A large part of the imlementation was taken from http://stackoverflow.com/a/15912824/3161376 which solved the problems that I had in the old implementation.
// The string struct will hold our data
// The declaration of our string struct that will contain the character array
template<char... str>
struct string
{
// The characters are immediately converted to lowercase when they are put in the array
@CyberDNIWE
CyberDNIWE / variant.cc
Created November 21, 2022 11:39 — forked from tibordp/variant.cc
A simple variant type implementation in C++
#include <iostream>
#include <utility>
#include <typeinfo>
#include <type_traits>
#include <string>
template <size_t arg1, size_t ... others>
struct static_max;
template <size_t arg>
@CyberDNIWE
CyberDNIWE / variant.cpp
Created November 16, 2022 17:29 — forked from calebh/variant.cpp
C++ variant indexed by integer with no standard library dependency
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the