Skip to content

Instantly share code, notes, and snippets.

View lkallio's full-sized avatar

Lalli Kallio lkallio

View GitHub Profile
Operator What does it do? Example Category Deprecating? (Unreliable)
"" Allows searching for a specific phrase - exact match search. "what is the capital of Finland" Basic, Mail
OR Boolean search function for OR searches as Google defaults to AND between words - must be all caps. laptops OR notebooks Basic, Mail
` ` Implements OR. laptops notebooks
() Allows grouping of operators and helps dictate order. (laptops OR notebooks) price under $500 Basic, Mail
- Excludes a word from results. jaguar speed -car Basic, Mail
* Acts as a wildcard and will match any word or phrase. how to * a tire Basic
#..# Use to find numbers in a series. smartphones 2024..2025 Basic
@lkallio
lkallio / cpp_accessor.h
Last active April 26, 2024 11:48
C++ Accessor
#include <functional>
#include <memory>
#include <type_traits>
#define SHARE_ARITHMETIC_OPERATOR_IF_POSSIBLE(op) \
template <typename U, typename K = std::common_type_t<U, T>> \
std::enable_if_t<std::is_same_v<decltype(std::declval<K>() op std::declval<K>()), K>, U> \
inline operator op(const U& other) \
{ \
return operator T() op other; \