Le 05/06/14 07:53, paul Fultz a écrit :
Hi,
I've just update the Tick library to support C++11 compilers including support for gcc 4.6:
https://github.com/pfultz2/Tick
To support gcc 4.6 an additional `TICK_RETURNS` macro was added. So while this can be written for gcc 4.7 or later:
TICK_TRAIT(is_incrementable) { template<class T> auto requires_(T&& x) -> TICK_VALID( returns<int>(x++) ); };
This can be written in order to support gcc 4.6:
TICK_TRAIT(is_incrementable) { template<class T> auto requires_(T&& x) -> TICK_VALID( TICK_RETURNS(x++, int) ); };
Of course, the macro is optional and only needed to support older compilers.
Any other feedback would be appreciated.
Hi, Does your library define just traits or try to emulate Concept Lite? In this post concepts@isocpp.org "[concepts] Can Concepts Lite be used to conditionally disable a copy constructor?" there are a couple of questions related to your library. * Can these traits be used to conditionally disable a constructors? an assignment? class NonCopyable { NonCopyable(NonCopyable const&) = delete; }; template <typename T> class wrapper { wrapper(const wrapper&) requires std::is_copy_constructible<T>::value {} }; * Can non-template members of template class be overloaded by only requires clause? I mean is the following examples correct (assuming that C1 and C2 are concepts): template<typename T> struct A { A(const A&) requires C1<T> { /*...*/ }; A(const A&) requires C2<T> { /*...*/ }; }; How the refinements plays on this concern? What are the limitations respect ConceptLite? Best, Vicente