Skip to content

Instantly share code, notes, and snippets.

View vdaghan's full-sized avatar

vdaghan

  • Hacettepe University
  • Ankara/Turkey
View GitHub Profile
@vdaghan
vdaghan / ConceptExamples.hpp
Created June 1, 2022 20:00
Concept Examples
/*
These are some concepts I had to create myself for my projects.
There may be shorter ways or more elegant ways to do these, yet I could not find them myself.
If you have any suggestions, please feel free to comment.
PS: I'll add tests for all of these concepts, eventually.
PPS: You can copy and paste this file as_is to Compiler Explorer (https://godbolt.org/) to play with.
Just make sure that you are compiling with a C++20-compliant compiler, with appropriate flags (/std:c++20 for MSVC, --std=c++20 for gcc).
*/
@vdaghan
vdaghan / LogWindow.h
Last active February 7, 2022 14:35
wxTextCtrl as a spdlog sink.
#ifndef LOG_WINDOW_H
#define LOG_WINDOW_H
// Say you have a MyFrame class derived from wxFrame and you want to add a wxWindow to that and use it as a spdlog sink.
// Declaration of your MyFrame class should be like this:
// #include "LogWindow.h"
// class MyFrame: public wxFrame {
// public:
// MyFrame();
// private: