LUMIERA.clone/src/lib/meta
Ichthyostega bc1cf3a0b5 Library: sharpen detection of possible string conversion
When invoking the util::toString conversion, we indeed to want any conversion,
including explicit conversion operators. However, probing the possibility to build a string
can be dangerous, since there is a string constructor from characters, and
integral types can be converted to characters.

OTOH, leaving out explicit conversions is likewise not desirable, since there are
class types, which deliberately do not offer an implicit conversion, but allow
explicit conversion for dump and diagnostic output. The notorious example for
such a situation is the lib::idi::EntryID<TY>. We certainly do not want an
EntryID to be converted into a string without further notice, but we do want
an EntryID to be automatically rendered to string in diagnostic output, since
this will include the human readable ID part.

See especially: 8432420726

Now we'll attempt to get out of this dilemma by probing explicitly for the presence
of a string conversion operator, which will fail for any non-class types, thereby
ruling out all those nasty indirect type -> character -> string conversion paths.

The rationale is: if someone queries the predicate can_convertToString, the intention
is really to get an string rendering, and not just to invoke some random function
with an string argument.
2018-12-10 00:09:56 +01:00
..
configflags.hpp Global-Layer-Renaming: adjust namespace qualification 2018-11-15 23:59:23 +01:00
duck-detector.hpp Refactoring: extract new duck detectors 2017-12-05 06:05:33 +01:00
function-closure.hpp DockAccess: better pass functor as const& into partial application 2018-01-13 00:58:08 +01:00
function-erasure.hpp DOC: eliminate spurious mentions of tr1:: 2018-01-12 03:03:25 +01:00
function.hpp DI: port the old Singleton unit tests 2018-03-26 07:54:16 +02:00
generator-combinations.hpp clean up lib/meta namespaces 2011-12-03 03:15:59 +01:00
generator.hpp clean up lib/meta namespaces 2011-12-03 03:15:59 +01:00
maybe-compare.hpp MERGE Doxygen clean-up done during the last months 2017-04-01 23:59:00 +02:00
no-instance.hpp Doxygen: fill in missing file level headlines for the Library (metaprogramming) 2016-11-07 15:39:13 +01:00
size-trait.hpp Doxygen: fill in missing file level headlines for the Library (metaprogramming) 2016-11-07 15:39:13 +01:00
trait-special.hpp MERGE Doxygen clean-up done during the last months 2017-04-01 23:59:00 +02:00
trait.hpp Global-Layer-Renaming: rename namespaces 2018-11-15 23:55:13 +01:00
tuple-helper.hpp Library: sharpen detection of possible string conversion 2018-12-10 00:09:56 +01:00
tuple-record-init.hpp Library: replace boost::noncopyable by our own library solution 2018-03-24 05:35:13 +01:00
typelist-manip.hpp maximum munch 2016-12-23 04:23:03 +01:00
typelist-util.hpp maximum munch 2016-12-23 04:23:03 +01:00
typelist.hpp Metaprogramming(#987): mark planned transition to variadic arguments 2017-09-28 00:10:45 +02:00
typeseq-util.hpp Metaprogramming(#987): mark planned transition to variadic arguments 2017-09-28 00:10:45 +02:00
util.hpp Library: sharpen detection of possible string conversion 2018-12-10 00:09:56 +01:00
value-type-binding.hpp Library: put the new type rebinding trait into general use 2017-12-02 02:51:51 +01:00
variadic-helper.hpp Metaprogramming: extend testcase and remould pickInit to support arbitrary arguments 2017-09-29 02:35:15 +02:00
virtual-copy-support.hpp Library: replace boost::noncopyable by our own library solution 2018-03-24 05:35:13 +01:00