This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <utility> | |
#include <tuple> | |
using namespace std; | |
// | |
// forward declare | |
// | |
template<int N1, int N2, int LAST, typename T> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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&&)> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SwiftUI | |
import PlaygroundSupport | |
typealias OnClickHandler = (() -> Void) | |
struct ParentView: View { | |
@State var loveEnabled = false | |
var body: some View { |