Request Short Link
C++ 98
C++ 11
C++ 14
C++ 17
C++ 20
C++ 23
C++ 2c
for-loops as while-loops
array subscription
Show all implicit casts
Show all template parameters of a CallExpr
Use libc++
Transform std::initializer_list
Show noexcept internals
Show padding information
Show coroutine transformation
Show C++ to C transformation
Show object lifetime
Default
15
18
20
22
26
More
GitHub
Patreon
Patreon
Issues
About
Policies
Examples
C++ Insights @ YouTube
Settings
Version
Consider supporting C++ Insights
×
Sponsors:
Made by
Andreas Fertig
Source:
#include <iostream> struct Test { Test() = default; Test(const Test &other) { std::cout << "copy ctor" << std::endl; } Test(Test &&other) { std::cout << "move ctor" << std::endl; } Test &operator=(const Test &other) = default; Test &operator=(Test &&other) = default; ~Test() = default; }; int main() { Test test; const Test &ref = test; (void)std::move(ref); using ExprType = decltype(std::move(ref)); auto emigma2 = std::move(ref); }
Insight:
Console: