Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 27 | 28 | 29 | 30 |
| 31 |
Tags
- avr-gcc
- yocto
- Debug
- bare metal
- 아두이노
- raspberrypi
- AArch64
- Raspberry
- Arduino
- GPIO
- QEMU
- 회로
- 라즈베리파이
- esp32
- atmel
- nucleo
- Debugging
- WPF
- buildroot
- UART
- 디버깅
- AVR
- C++
- Visual Studio Code
- STM32
- Visual Studio
- Linux
- cpp
- vscode
- c#
Archives
- Today
- Total
목록Overloading (1)
임베디드를 좋아하는 조금 특이한 개발자?
rel_ops를 통한 클래스 비교연산자 자동 구현
저는 C++에서 클래스를 설계할 때 귀찮은 부분중 하나가 비교연산자를 구현이라고 생각합니다. !,==,!= 6개나 되는 연산자를 오버로딩하는 것은 매우 번거롭죠. 하지만! 예상외로 C++에서는 rel_ops - C++ Reference 123456 namespace rel_ops { template bool operator!= (const T& x, const T& y) { return !(x==y); } template bool operator> (const T& x, const T& y) { return y bool operator= (const T& x, const T& y) { re cplusplus.com https://en.cppreference.com/w/cpp/utility/rel_ops/..
C++
2022. 8. 28. 15:53