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
| // Test of performance bug with some std::map and std::unordered_map implementations | |
| // see http://www.forwardscattering.org/post/37 for details. | |
| // | |
| // Written by Andrey Upadyshev https://github.com/oliora/ based on article's test code | |
| #include <unordered_map> | |
| #include <map> | |
| #include <iostream> | |
| #include <iomanip> | |
| #include <chrono> | |
| #include <type_traits> |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <!--See more at http://superuser.com/a/1064474/581948--> | |
| <key>Label</key> | |
| <string>NAME.sshfs</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>/usr/local/bin/sshfs</string> |
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
| // Simple ORM = SORM | |
| namespace sorm { | |
| namespace details { | |
| template<size_t N, class Statement, class P> | |
| inline void bind_params(Statement& stmt, const P& p) | |
| { | |
| bind_param(stmt, N, p); | |
| } | |
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
| // Developing of the topic, see previous gists: | |
| // 1. https://gist.github.com/oliora/b8207b4a74a6bb868ef4 | |
| // 2. https://gist.github.com/pudov/0b1572989c418684c381 | |
| #include <type_traits> | |
| #include <utility> | |
| #include <vector> | |
| #include <set> | |
| // Let's use std::void_t. Unfortunately it's introduced in C++17 but you can easily add it by yourself |
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 <iostream> | |
| #include <type_traits> | |
| #include <utility> | |
| namespace { | |
| struct Func | |
| { | |
| Func() = default; |
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 <type_traits> | |
| #include <utility> | |
| #include <algorithm> | |
| namespace has_own_find_impl__ { | |
| struct two__ { char c__[2]; }; | |
| template <class T> static two__ test__(...); | |
| template <class T> static char test__(decltype(std::declval<T>().find(std::declval<typename T::key_type>()))* = 0); |
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
| diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx | |
| index 14e2794..01bb31d 100644 | |
| --- a/Source/Modules/python.cxx | |
| +++ b/Source/Modules/python.cxx | |
| @@ -2378,7 +2378,7 @@ public: | |
| Printv(f->def, linkage, builtin_ctor ? "int " : "PyObject *", wname, "(PyObject *self, PyObject *args) {", NIL); | |
| Wrapper_add_local(f, "argc", "int argc"); | |
| - Printf(tmp, "PyObject *argv[%d]", maxargs + 1); | |
| + Printf(tmp, "PyObject *argv[%d] = {}", maxargs + 1); |
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 "logger.h" | |
| Logger Logger::instance_; | |
| void Logger::log() | |
| { | |
| //... | |
| } |
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
| From 6252e5f867d6e1bea603aa2a0e24e6e0b861ea9f Mon Sep 17 00:00:00 2001 | |
| From: Andrey Upadyshev <[email protected]> | |
| Date: Tue, 18 Nov 2014 18:48:52 +0100 | |
| Subject: Log patch: fixes incorrect output of the dump manipulator, when used | |
| on AVX2-enabled CPU (e.g. Intel Haswell). | |
| --- | |
| libs/log/src/dump_avx2.cpp | 2 +- | |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
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
| # forward_variables usage example | |
| include(forward_variables.cmake) | |
| # After call to this function, all variables set by find_package will be forwarded to | |
| # function caller scope (i.e. into parent scope). | |
| function(find_boost_package) | |
| start_track_variables() | |
| set(bla_bla 1) |