Boost logo

Boost Users :

Subject: Re: [Boost-users] [MPL] implementing a "trait"?
From: John M. Dlugosz (ngnr63q02_at_[hidden])
Date: 2014-02-10 19:39:12


On 2/8/2014 11:44 AM, Alex wrote:
> Now have a simpler solution:
> // use this struct to "read" the traits from the functions
> template<class T> struct trait
> {
> typedef decltype(is_pretty_function(std::declval<T*>())) is_pretty;
> };

Nice! These things are getting easier with newer compiler features.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net