Thanks for using Compiler Explorer
Jakt
C++
Ada
Analysis
Assembly
C
Carbon
C++ (Circle)
CIRCT
Clean
CMake
C++ for OpenCL
MLIR
Cppx
Cppx-Blue
Cppx-Gold
Cpp2-cppfront
Crystal
C#
CUDA C++
D
Dart
Erlang
Fortran
F#
Go
Haskell
HLSL
Hook
ispc
Java
Julia
Kotlin
LLVM IR
Nim
Objective-C
Objective-C++
OCaml
OpenCL C
Pascal
Pony
Python
Racket
Ruby
Rust
Scala
Solidity
Swift
Toit
TypeScript Native
Visual Basic
Zig
c++ source #1
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Compiler
FreeBSD clang 13.0.0
p0849 (modified clang 12)
Options
Source code
#include <concepts> #include <array> template<class T> using __with_reference = T&; template<class T> concept __Referenceable = requires { typename __with_reference<T>; }; template<class I> concept __LegacyIterator = requires(I i) { { *i } -> __Referenceable; { ++i } -> std::same_as<I&>; { *i++ } -> __Referenceable; }; template<class R> concept has_member_begin = std::is_lvalue_reference_v<R> && requires(R& r) { r.begin(); { auto(r.begin()) } -> __LegacyIterator; }; template<has_member_begin T> void constrained(T &&); // 1 template<class T> void constrained(T); void test() { int c_array[3]; std::array<int, 3> cxx_array; constrained(c_array); constrained(cxx_array); // 1 }
Become a Patron
Sponsor on GitHub
Donate via PayPal
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
About the author
Changelog
Version tree