Lumiera  0.pre.03
»edit your freedom«
StringConv< X, COND > Struct Template Reference

#include "lib/meta/util.hpp"

Description

template<typename X, typename COND = void>
struct util::StringConv< X, COND >

failsafe invocation of custom string conversion.

Returns
string to represent the object, by default a type display
Remarks
this is a lightweight solution to at least get any human readable string representation for pretty much every language object. This minimal solution is defined here, to allow for built-in diagnostics for custom types without the danger of creating much header inclusion and code size bloat. A more elaborate, extended solution, including lexical conversions for numbers, is defined in format-obj.hpp
Template Parameters
Xthe nominal type to base the string conversion on; should be a plain type (class or value) without CV-qualification and references
Note
any exceptions during string conversion are caught and silently ignored; the returned string indicates "↯" in this case.
See also
util::toString() a user friendly front-end
Examples:
/Werk/devel/lumi/src/lib/test/test-helper.hpp.

Definition at line 390 of file meta/util.hpp.

Static Public Member Functions

static std::string invoke (X const &x) noexcept
 
+ Collaboration diagram for StringConv< X, COND >:

The documentation for this struct was generated from the following file: