Skip to content

Instantly share code, notes, and snippets.

View notfoundry's full-sized avatar

Mark Johnson notfoundry

  • Canada
View GitHub Profile
@notfoundry
notfoundry / jni_classpath.cpp
Created July 24, 2018 16:51
JNI-querying IClassPath implementation for the JNIF C++ library
#include <exception>
#include <string>
#include <memory>
#include <jni.h>
#include <jnif/jnif.hpp>
class jni_class_loader {
public:
@notfoundry
notfoundry / strongdim.hpp
Last active June 16, 2018 17:17
Strongly-dimensioned quantity types for C++11
#include <cstddef>
#include <type_traits>
#include <boost/mp11/list.hpp>
#include <boost/mp11/bind.hpp>
#include <boost/mp11/utility.hpp>
#include <boost/mp11/function.hpp>
#include <boost/mp11/integral.hpp>
#include <boost/mp11/algorithm.hpp>
#include <boost/mp11/map.hpp>
@notfoundry
notfoundry / with_defaults.hpp
Created May 26, 2018 15:35
Keep some default template parameters of a type while replacing others
#include <boost/mp11/list.hpp>
#include <boost/mp11/utility.hpp>
#include <boost/mp11/algorithm.hpp>
#include <type_traits>
#include <cstddef>
struct _ {};
namespace detail {
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="versiontype">
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:complexType name="targettype">
<xs:sequence>
<xs:element name="id" type="xs:string"/>
Verifying that +foundry is my openname (Bitcoin username). https://onename.com/foundry