"Yutaka Leon Suematsu"
Hi everyone,
I am new at the excellent Boost library. It is an incredible source of smart techniques and ticks.
I would like to ask if there is a way to evaluate, in compile time, the existence of a specific constructor, except from the constructor default and copy constructor (I know the functions has_trivial_constructor and has_trivial_copy from the type_traits library). For example in the following code, I would like to evaluate the existence of both "A(const Config& config)"
You can do something like this with is_convertible
and " template <class Random> A(const Config& config, Random& random) " constructors.
This one there's no known technique for.
Class A { A(){.} A(const Config& config){.} template <class Random> A(const Config& config, Random random){.} . }
Also, I would like to know why and how the has_trivial_constructor works.
When it works, it relies on implementation-specific magic help from the compiler. -- Dave Abrahams Boost Consulting www.boost-consulting.com