Le 15/06/14 13:04, Andrey Semashev a écrit :
On Sunday 15 June 2014 12:07:44 Vicente J. Botet Escriba wrote:
Le 13/06/14 20:27, Peter Dimov a écrit :
The only requirement for a type trait (or a metaprogramming predicate, in general) should be to have a ::value with a value of 0 or 1. Nothing more. No ::tags. No required base classes. No mandatory dependencies of any kind. What should be and what it is a quite different concern. The current documentation says that a boolean type traits inherits from boost::true_type or boost::false_type. If you read some earlier posts, you will find discussion about TypeTraits.Core submodule. I think no one in good consciousness considers to break TypeTraits backward compatibility in such a radical way. Glad to see we agree we don't want to break backward compatibility.
If you want to dispatch, type traits with a ::value == 0 should be _convertible_ to false_type, and type traits with a ::value == 1 should be convertible to true_type, but they should not be required to derive from them. This convertibility can be achieved from the true_type/false_type side. I don't see how. http://lists.boost.org/Archives/boost/2014/06/214248.php
Agreed I missed this post :( Let me know IIUC: are you proposing Core true_, false_ types that can be used by TypeTraits and MPL preserving backward compatibility? Just to clarify my concern, the documentation of TypeTraits doens't preclule any dependency to MPL types and any module using this implementation detail should be fixed or we need to update the TypeTraits documentation. Sorry if my comments could be of non-sense, and everything is clear for every people. Best, Vicente