Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
#include
#include
#include "func.h" void NoRefFoo(Counter x) { std::cout << "No ref func: " << x << '\n'; } void RefFoo(const Counter& x) { std::cout << "Ref func: " << x << '\n'; } int main() { static_assert(sizeof(Counter) <= 8); int x = 0; Counter w(x); int n; std::cin >> n; srand(n); static_assert(!std::is_invocable_v
); static_assert(std::is_invocable_v
); static_assert(std::is_invocable_v
); std::cout << "All static assertions passed!\n"; RefFoo(w); x = 19; int cnt; do { cnt = abs(rand()) % 20; } while(cnt == 0); for (size_t i = 0; i < cnt; ++i) { std::cout << w << '\n'; } std::cout << w << '\n'; x = 38; std::cout << w << '\n'; return 0; }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)