Category: c++20

[c++20][windows] std::chrono::from_stream 사용중 버그

c++ 모던, 그리고 20로 발전되어 오면서 사소한 구현을 std 의 라이브러리/함수를 사용하면 편리해 졌습니다.. 대다수가 안되던 것은 당연히 아니니까요 그중에서 string 시간/날자 를 chrono time , time_point 로 변환할 수 있는 https://en.cppreference.com/w/cpp/chrono/duration/from_stream from_stream 을 사용할 수 있습니다 예를들면 “2021-12-06 12:31:04” 같은 문자열을 time_point 로 변환할 수 있고 연산이나 값을 사용할 수 있죠.. 다만 이는 현재 […]

[c++17][byte] visual studio c++17 with windows.h byte error C2872

visual studio 상에서 c++17 옵션을 활성화 시 만날 수 있는 오류 영문 1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\shared\rpcndr.h(192): error C2872: ‘byte’: ambiguous symbol1>c:\program files (x86)\windows kits\10\include\10.0.14393.0\shared\rpcndr.h(191): note: could be ‘unsigned char byte’1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\cstddef(15): note: or ‘std::byte’ 한글 1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\oaidl.h(563,26): error C2872: ‘byte’: 모호한 기호입니다.1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\rpcndr.h(191,23): message : ‘unsigned char byte’일 […]

c++20 future c++?

문득 c++11 이후의 c++ 11,14,17 을 흔히 모던 c++ 이라고 하지 c++20 이 표준으로 지정된 지금 c++20 은 뭐라 불러야하지.. c++11,14,17,20 모두 같은 modern 이기엔 너무 긴 시간이 아닌가..이번까지만 modern 으로 쳐주는건가…… c++ 20 의 주요 내용https://en.cppreference.com/w/cpp/compiler_support/20 현재 인지 하고 있는 내용들(정확한 기능이 아니래도 이런 이런 기능이 추가 되는구나 라고 인지하는것들) coroutines modules concept Three-way […]

Three-way comparison : c++20

<=> 3방향 비교 연산자 Three-way comparison The three-way comparison operator expressions have the form lhs <=> rhs The expression returns an object such that (a <=> b) < 0 if lhs < rhs (a <=> b) > 0 if lhs > rhs (a <=> b) == 0 if lhs and rhs are equal/equivalent. If one of the operands is of type bool and the other is not, the program is ill-formed. If both operands have arithmetic types, or if one operand has unscoped enumeration […]

default comparison : c++20

“default comparison” feature 를 기록해본다c++20 은 가장최근에 최근최근에 공인된 표준이기에 자료도적을것이고 관련자료를 만들어둘경우 유입, 공부도 더 동기부여가 될것으로 보여 따로 하나씩 기록해 두려 한다(다만 착각,실수,핑계,등으로 정확하지 않은 정보가 될 수 있어 읽어보신분들께서 의견주시면 그때그때 바로 제대로된 정보로 수정하겠습니다) Defaulting <=> automatically gives ==, !=, <, >, <=, >= C++20 has a new “default comparison” feature setup so that […]