Print type:
#include <cxxabi.h>
...
auto print_type = []<typename TT>(TT&&) {
int s; return abi::__cxa_demangle(typeid(TT).name(),0,0,&s); };
In variant:
#include <boost/asio.hpp> | |
#include <boost/asio/ip/multicast.hpp> | |
#include <iostream> | |
#include <string> | |
#include <functional> | |
#include <vector> | |
#include <span> // C++20 | |
#include <stdexcept> | |
class MulticastClient { |
#include <boost/asio.hpp> | |
#include <iostream> | |
#include <string> | |
#include <stdexcept> | |
#include <unordered_map> | |
class MulticastServer { | |
public: | |
// Constructor throws on critical errors (e.g., invalid bind address or socket open fail). | |
explicit MulticastServer(const std::string &bind_address = "0.0.0.0", int failure_threshold = 3) |
Print type:
#include <cxxabi.h>
...
auto print_type = []<typename TT>(TT&&) {
int s; return abi::__cxa_demangle(typeid(TT).name(),0,0,&s); };
In variant:
namespace detail { | |
template<size_t M, size_t N> | |
struct gcd_impl { | |
static constexpr size_t R = (N == 0) ? 0 : (M % N); | |
static constexpr size_t value = (R == 0) ? N : gcd_impl<N,R>::value; | |
}; | |
template<size_t M> struct gcd_impl<M,0> { static constexpr size_t value = M; }; | |
template<size_t N> struct gcd_impl<0,N> { static constexpr size_t value = 0; }; |
set history=10000 | |
set smartcase | |
set ignorecase | |
set expandtab | |
set shiftwidth=3 | |
set softtabstop=3 | |
set smartindent | |
let hlstate=1 | |
set hlsearch |
[user] | |
name = "Gergely Nagy" | |
email = [email protected] | |
[alias] | |
b = branch | |
co = checkout | |
ci = commit | |
cp = cherry-pick | |
l = log --oneline --graph --decorate -15 | |
s = status |