implicit conversion from void to T and T to void?

Hi,

Looking at the code for Loki (Andrei Alexandrescu) there appear to be code that says that there is an implicit conversion from void to T and from T to void where T is any type...

1
2
3
4
5
6
7
8
9
10
11
12
    template <class T>
    struct Conversion<void, T>    
    {
        enum { exists = 1, exists2Way = 0,sameType = 0 };
    };
    
    template <class T>
    struct Conversion<T, void>    
    {
        enum { exists = 1, exists2Way = 0,sameType = 0 };
    };



But this does not make sense!

Regards,
Juan
You need to see this in context. Loki was full of mind/compiler bending tricks to achieve particular results.

Re-read section 2.7 and come back if you still have questions.
Registered users can post here. Sign in or register to post.