Skip to content

Instantly share code, notes, and snippets.

View albeva's full-sized avatar

Albert Varaksin albeva

  • London, United Kingdom
View GitHub Profile
@albeva
albeva / gist:2975962
Created June 23, 2012 00:25
C++11 variadic template based tuple sort
#include <iostream>
#include <utility>
#include <tuple>
using namespace std;
//
// forward declare
//
template<int N1, int N2, int LAST, typename T>
#include <iostream>
#include <type_traits>
/**
* Property template encapsulates the callback
* functions to getter and setter of the property.
* it does not store the propertyu value itself
*/
template<typename T, class U, T(U::*getter_fn)(), void(U::*setter_fn)(T&&)>
import Foundation
import SwiftUI
import PlaygroundSupport
typealias OnClickHandler = (() -> Void)
struct ParentView: View {
@State var loveEnabled = false
var body: some View {