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
Issues
About
Policies
Examples
C++ Insights @ YouTube
Settings
Version
None
×
Made by
Andreas Fertig
Powered by
Flask
and
CodeMirror
Source:
#include <iostream> #include <string> #include <type_traits> #include <vector> #include <map> #include <set> #include <unordered_map> template< typename TValue > inline void Print( const TValue& value ) { std::cout << "Value"; } template< typename TItem, typename TAllocator, template< typename, typename > class TStorage > inline void Print( const TStorage<TItem, TAllocator>& storage ) { std::cout << "Linear container"; } template< typename TItem, size_t ARRAY_LENGTH > inline void Print( const TItem (&storage)[ ARRAY_LENGTH ] ) { std::cout << "Trivial array"; } template< typename TItem, typename TPredicate, typename TAllocator > inline void Print( const std::set<TItem, TPredicate, TAllocator>& storage ) { std::cout << "Set"; } template< typename TKey, typename TItem, typename TPredicate, typename TAllocator > inline void Print( const std::map<TKey, TItem, TPredicate, TAllocator>& storage ) { std::cout << "Map"; } template< typename TKey, typename TItem, typename THash, typename TPredicate, typename TAllocator > inline void Print( const std::unordered_map<TKey, TItem, THash, TPredicate, TAllocator>& storage ) { std::cout << "Hash map"; } int main() { Print( 10.0f ); Print( 42ULL ); Print( std::vector<int>{ 5, 3, 8, 6 } ); return 0; }
Insight:
Console: