Boost.Hana  1.6.0
Your standard library for metaprogramming
Experimental features

Description

Experimental features that may or may not make it into the library. These features should not expected to be stable.

Classes

struct  boost::hana::experimental::types< T >
 Container optimized for holding types. More...
 

Functions

template<typename T >
auto boost::hana::experimental::type_name ()
 Returns a hana::string representing the name of the given type, at compile-time. More...
 

Variables

auto boost::hana::experimental::print
 Returns a string representation of the given object. More...
 

Function Documentation

◆ type_name()

template<typename T >
auto boost::hana::experimental::type_name ( )

#include <boost/hana/experimental/type_name.hpp>

Returns a hana::string representing the name of the given type, at compile-time.

This only works on Clang (and apparently MSVC, but Hana does not work there as of writing this). Original idea taken from https://github.com/Manu343726/ctti.

Variable Documentation

◆ print

auto boost::hana::experimental::print

#include <boost/hana/experimental/printable.hpp>

Initial value:
= [](auto const& x) -> std::string {
return tag-dispatched;
}

Returns a string representation of the given object.

This function is defined for most containers provided by Hana, and also for objects that define an operator<< that can be used with a std::basic_ostream. It can recursively print containers within containers, but do not expect any kind of proper indentation.

This function requires (the rest of) Boost to be available on the system. It also requires RTTI to be enabled.