
Steven Watanabe-4 wrote:
AMDG
On 06/05/2011 11:06 AM, Vicente Botet wrote:
when decltype is supported (as it is the case for gcc 4.6.0) we can define the C++0x traits is_constructible, is_assignable and the ones that depend on them.
How exactly does decltype allow you to implement is_constructible?
We can use it as the return type of the test function. FOr example to test if T can be constructed with two parameters A1, A2 decltype((T(declval<A1>(),declval<A2>()), true_type())) test(int); false_type test(...); Unfortunately, Boost.TypeOf can not be used for the failing checks, as compilation fails. I have committed them in the sandbox under conversion/boost/conversion/type_traits. Best, Vicente -- View this message in context: http://boost.2283326.n4.nabble.com/type-traits-is-constructible-when-decltyp... Sent from the Boost - Dev mailing list archive at Nabble.com.