C++20's (https://youtu.be/WX3OmVu4lAs) • time_zone and time_zone_link (https://youtu.be/MODhhr7m-5s) • system_clock::now(), file_clock, leap second awareness (https://youtu.be/c7DT28TV0AY)9 Part II: Calendrical Types10 time_point = time_point; static constexpr bool is_steady = false; static time_point now() {} }; static_assert(is_clock_v ); For a type T to qualify as a Clock, it must satisfy following expressions must be well- formed when treated as an unevaluated operand • T::is_steady • T::now() The newly-added trait is_clock detects whether a given type satisfies the Clock requirements.20 0 码力 | 55 页 | 8.67 MB | 6 月前3
A Crash Course in Calendars, Dates, Time, and Time Zonesclock has a now() method21 Clocks – Examples Example: // Get current time as a time_point. system_clock::time_point tpoint { system_clock::now() }; // Or: auto tpoint { system_clock::now() }; // Convert "%H:%M:%S");22 Clocks Time execution time: // Get start time. auto start { high_resolution_clock::now() }; // Execute code to benchmark. double d { 0 }; for (int i { 0 }; i < 1'000'000; ++i) { sqrt(sin(i) * cos(i)); } // Get end time and calculate the difference. auto end { high_resolution_clock::now() }; auto diff { end – start }; // Convert difference into milliseconds. cout << duration0 码力 | 43 页 | 551.60 KB | 6 月前3
C++20: An (Almost) Complete OverviewstartValue }; i < startValue + numberOfValues; ++i) { time_t t { system_clock::to_time_t(system_clock::now()) }; cout << std::ctime(&t); co_yield i; } } int main() { auto gen { GetSequenceGenerator(10 well- formed:constexpr Changes32 constexpr constexpr virtual functions constexpr functions can now: use dynamic_cast() and typeid do dynamic memory allocations, new / delete contain try/catch But still cannot throw exceptions33 constexpr string & vector std::string and std::vector are now constexpr Needed to support constexpr reflection in the future “C++20 STL Features: One Year of0 码力 | 85 页 | 512.18 KB | 6 月前3
Making Libraries Consumable for Non-C++ DevelopersWho am I? Still at Microsoft, now on the .NET Core runtime team. • https://github.com/dotnet/runtimeWhat is interoperability? Enabling two or more disparate entities to work together. Don’t touch it etc. // obj now at 0x6800. // 0x9200 -> 0x6800 Sys_Query(hnd); hnd // Collection occurs. // obj now at 0x7200. // 0x9200 –> 0x???? Sys_Query(hnd); // Collection occurs. // obj now “free”. // 0x9200 Document what you want and assume. • Understand assumptions and be precise when possible. • C++ now has many types that express precisely what is meant – integer sizes, string encoding, etc. • Interop0 码力 | 29 页 | 1.21 MB | 6 月前3
No Silver Bullet – Essence and Accident in Software Engineeringconstraints, awkward programming languages, lack of machine time. How much of what software engineers now do is still devoted to the accidental, as opposed to the essential?”Agile Abstract “Therefore software costs drop as rapidly as computer hardware costs do…. Not only are there no silver bullets now in view, the very nature of software makes it unlikely that there will be any.”Sources of Essential environment • They attack the accidental difficulties of using tools togetherHopes for the Silver“Now let us consider the technical developments that are most often advanced as potential silver bullets0 码力 | 35 页 | 1.43 MB | 5 月前3
whats new in visual studioC++20 is now feature complete • All features under /std:c++20 switch are production ready including modules, coroutines, concepts • C++20 features awaiting DR resolution are available for now under /std:c++latest C++: Making it Real Sunny Chatterjee – _2 Address Sanitizer /fsanitize=address support in MSVC now generally-available • x86 and X64 support • Debug configurations (/MTd, /MDd) included • Runtime libraries0 码力 | 42 页 | 19.02 MB | 6 月前3
nativescript-new-looper-vantoll.pptxthreaded, by default ? • Samples for background execution are now available. • WebWorkers API coming soon Angular ? • Angular 2 final—Now 100% more a thing ? @next builds npm install -g nativescript@next0 码力 | 36 页 | 10.78 MB | 1 年前3
C++20 STL Features: 1 Year of Development on GitHubspace-efficient, very time-efficient • Sorted arrays: binary_search, lower_bound, equal_range • Now you can use constexpr algorithms • Easy: static_assert with constexpr is_sorted • string_view is • Especially important for binary compatibility • Codebase consistency is important, especially now • Ideally, looks like the work of a single author • Consistent code consistent behavior, fewer0 码力 | 45 页 | 702.09 KB | 6 月前3
Working with Asynchrony Generically: A Tour of C++ Executorspending_completion_.exchange(this); assert(previous == nullptr); } }; Here be dragons.… AND NOW THIS WORKS 117 int main() { register_keyboard_callback(on_keyclick); (void) unifex::sync_w com/ericniebler/executors_demo_code_cppcon_2021.git119 DEMO TIME (with huge shoutout to Kirk Shoop)120 Where to now?121 WHAT’S TO COME P2300 “std::execution”, currently on track for C++23, brings: • the concepts0 码力 | 121 页 | 7.73 MB | 6 月前3
NativeScript UI7 UI components • Supports Angular and non-Angular usage. • Used to have free and paid tiers—now all free! Agenda • Introduce {N} UI • Demo ? • Raucous applause ?? Controls • SideDrawer ?️0 码力 | 22 页 | 1.91 MB | 1 年前3
共 19 条
- 1
- 2
相关搜索词
C++20ChronoCrashCourseinCalendarsDatesTimeandZonesAnAlmostCompleteOverviewMakingLibrariesConsumableforNonDevelopersNoSilverBulletEssenceAccidentSoftwareEngineeringwhatsnewvisualstudionativescriptloopervantollpptxSTLFeaturesYearofDevelopmentonGitHubWorkingwithAsynchronyGenericallyTourExecutorsNativeScriptUI













