This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [core] | |
| editor = \"C:/Program Files (x86)/GitExtensions/GitExtensions.exe\" fileeditor | |
| [user] | |
| name = tunmiang | |
| email = tunmiang.su@kla-tencor.com | |
| [pull] | |
| rebase = false | |
| [fetch] | |
| prune = false | |
| [rebase] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cassert> | |
| #include <mutex> | |
| #include <condition_variable> | |
| #include <variant> | |
| #include <utility> | |
| #include <exception> | |
| #if __has_include(<coroutine>) | |
| #include <coroutine> | |
| namespace coro = std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var inspWindow = new StationUI.MainWindow(glueInsp, camera, lightingController, new LiteOn.ImageNaming(2, "glue_raw_", "housing_")); | |
| System.Windows.Forms.Integration.ElementHost.EnableModelessKeyboardInterop(inspWindow); | |
| inspWindow.ExpertMode = true; | |
| inspWindow.ShowDialog(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "stdafx.h" | |
| #include <iostream> | |
| void overloaded(int const &arg) { std::cout << "by lvalue\n"; } | |
| void overloaded(int && arg) { std::cout << "by rvalue\n"; } | |
| template< typename t > | |
| void forwarding(t && arg) { | |
| std::cout << "via std::forward: "; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // CppCon 2016: Ben Deane “A Static Alternative to Virtual Functions, Using Expression SFINAE" | |
| // detect whether a type has a member method | |
| #define DETECT(name, expr) \ | |
| template <typename T> \ | |
| using name##_t = decltype(expr); \ | |
| \ | |
| template <typename T, typename = void> \ | |
| struct has_##name : public std::false_type {}; \ | |
| \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // http://cpp.indi.frih.net/blog/2015/04/tippet-use-reference_wrapper-to-create-views-of-data/ | |
| // A job struct | |
| struct job | |
| { | |
| size_t id; | |
| chrono::system_clock::time_point time; | |
| int priority; | |
| static auto order_by_time(job const& a, job const& b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "stdafx.h" | |
| #include <assert.h> | |
| #include <iostream> | |
| using namespace std; | |
| auto logAspect = [](auto f) { | |
| return [=](auto&&... args) { | |
| cout << "start" << endl; | |
| f(std::forward<decltype(args)>(args)...); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "stdafx.h" | |
| #include <functional> | |
| #include <iostream> | |
| struct Foo { | |
| Foo(int num) : num_(num) {} | |
| void print_add(int i) const { std::cout << num_ + i << '\n'; } | |
| int num_; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Fundamentals of Type-Dependent Code Reuse in C++ - Mark Isaacson | |
| // url: https://vimeo.com/131194141 | |
| // NDC Conferences 2015 | |
| #include "stdafx.h" | |
| #include <assert.h> | |
| #include <type_traits> | |
| using namespace std; |