C++ - std::exchange

C++14부터 사용 가능. 아래의 파일을 포함해야 한다 #include <utility> 함수 원형 template< class T, class U = T > T exchange( T& obj, U&& new_value ); 예제 코드 flags_type flags(flags_type newf) { return std::exchange(flags_, newf); } s.flags(12) void f() {...
더 읽기

네트워크 상태 시뮬레이션 툴

comcast Simulating shitty network connections so you can build better systems. https://github.com/tylertreat/comcast 네트워크 상태 시뮬레이션 툴이다. 패킷 드럅율이나 레이턴시를 임의로 조정할 수 있어서 네트워크 상태가 좋지 않은 경우에 애플리케이션이 문제 없이 잘 동작하는지 테스트 할 때 사용하면 좋다. Golang으로 만들었고,...
더 읽기