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> | |
template<typename T> | |
struct move_on_copy | |
{ | |
move_on_copy(T&& aValue) : value(std::move(aValue)) {} | |
move_on_copy(const move_on_copy& other) : value(std::move(other.value)) {} |
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 <chrono> | |
#include <memory> | |
#include <string> | |
#include <atomic> | |
#include <thread> | |
#include <iostream> | |
#include <v8.h> | |
int main() | |
{ |
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
struct A | |
{ | |
}; | |
struct B | |
{ | |
B(const A&){} | |
void foo(); | |
}; |
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 <thread> | |
#include <iomanip> | |
#include <iostream> | |
#include <sys/types.h> | |
#include <sys/shm.h> | |
#include <sys/ipc.h> | |
int main() | |
{ | |
static auto now = +[](std::ostream &os)->std::ostream& { | |
auto now = std::chrono::high_resolution_clock::now(); |