Checking if UFCS function exists for a specific type

2013-08-29 Thread Rory McGuire
Hi all, I've got this little ctfe template function that checks if a function called member with first argument T exists. Its for checking if a type has a custom encoder. bool hasUFCSmember(T, string member)() { T v; // would be nice if we could use ParameterTypeTuple to get the fir

Re: Checking if UFCS function exists for a specific type

2013-08-29 Thread Rory McGuire
On Thursday, 29 August 2013 at 21:06:04 UTC, Rory McGuire wrote: Hi all, I've got this little ctfe template function that checks if a function called member with first argument T exists. Its for checking if a type has a custom encoder. bool hasUFCSmember(T, string member)() { T v; /

Re: Checking if UFCS function exists for a specific type

2013-08-30 Thread Rory McGuire
On Thursday, 29 August 2013 at 21:10:41 UTC, Rory McGuire wrote: On Thursday, 29 August 2013 at 21:06:04 UTC, Rory McGuire wrote: Hi all, I've got this little ctfe template function that checks if a function called member with first argument T exists. Its for checking if a type has a custom e