summaryrefslogtreecommitdiff
path: root/libs/litehtml/src/internal.h
blob: 9b53a436dfcb342b685ce92651fa63ac809f7b09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef LH_INTERNAL_H
#define LH_INTERNAL_H
// internal.h should not be included in header files
// internal.h should be included after all other headers in a source file

namespace litehtml
{

template<class T, class TT>
bool operator/(const T& x, const TT& xx)
{
	return contains(xx, x);
}
// a in b if b contains a
#define in /

/* Limitations of overloaded operators compared to regular function calls:
* 1. at least one operand must be a class, so cannot just write `ch in "abc"` 
*    (possible solution: ch in "abc"_s)
* 2. operand cannot be initializer list (exception: assignment ops), so cannot just write `ch in {'a','b','c'}` 
*    (possible solution: ch in ${'a','b','c'})
*/

} // namespace litehtml

#endif // LH_INTERNAL_H