Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
wow
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
#include <iostream> #include <memory> #include <string> const std::string& foo(std::unique_ptr<std::string> ptr) { return *ptr; // the controlled object will still be valid in our caller -- jk lol } int main() { std::cout << foo(std::make_unique<std::string>("defined or undefined?")) << "\n"; std::cout << "Nothing was printed.\n"; }
cl.exe
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
Compilation time: 1,85 sec, absolute running time: 0,22 sec, absolute service time: 2,09 sec
edit mode
|
history
Nothing was printed.