Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
dffd
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
//g++ 5.4.0 #include <iostream> #include <algorithm> #include <iterator> namespace details { template<typename T, size_t N, size_t ... I> void array_out_impl(T (&arr)[N], std::index_sequence<I...>) { int fake[] = { ((std::cout << arr[I] << ' '), 0)... }; (void)fake; } } template<typename T, size_t N> void array_out(T (&arr)[N]) { details::array_out_impl(arr, std::make_index_sequence<N>()); std::cout << '\n'; } int main() { int ary[] = { 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 }; array_out(ary); }
g++
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
Compilation time: 0.82 sec, absolute running time: 0.12 sec, cpu time: 0.06 sec, memory peak: 3 Mb, absolute service time: 0,95 sec
edit mode
|
history
0 2 4 6 8 1 3 5 7 9