This file contains hidden or 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
// an example to create a new mapping `ctrl-y` | |
/* | |
mapkey('<Ctrl-y>', 'Show me the money', function() { | |
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).'); | |
}); | |
*/ | |
// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works. | |
map('gt', 'T'); |
This file contains hidden or 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 <cassert> | |
#include <memory> // std::addressof | |
template<typename ResourceTag, typename ResourceType> class Resource { | |
public: | |
Resource() noexcept = default; | |
explicit Resource(ResourceType resource) noexcept : resource_{ resource } {} | |
Resource(const Resource&) = delete; | |
Resource& operator=(const Resource&) = delete; |
This file contains hidden or 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 <cassert> | |
#include <memory> // std::addressof | |
template<typename ResourceTag, typename ResourceType> class Resource { | |
public: | |
Resource() noexcept = default; | |
explicit Resource(ResourceType resource) noexcept : resource_{ resource } {} | |
Resource(const Resource&) = delete; | |
Resource& operator=(const Resource&) = delete; |