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
- 디버깅
- UART
- Arduino
- yocto
- QEMU
- STM32
- MVVM
- Visual Studio Code
- buildroot
- c#
- 아두이노
- WPF
- 라즈베리파이
- AVR
- 회로
- C++
- atmel
- raspberrypi
- Visual Studio
- esp32
- AArch64
- bare metal
- Debugging
- GPIO
- vscode
- avr-gcc
- Linux
- nucleo
- Raspberry
- Debug
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