Tick icon indicating copy to clipboard operation
Tick copied to clipboard

How to Declare Tick class as friend

Open IkoLogs opened this issue 5 years ago • 0 comments

Hi

I want my tick trait class to have private access to its argument T type.

So i need to declare my tick triat class as friend of T.

How do i do that , cause not sure what the ecat class prototype would be for tick class cause i use the Macro

example
`TICK_TRAIT(My_Trait)
{
    template<class T_SomeType>
    auto require(T&& x) -> valid<
        decltype(T_SomeType::SomeFunc()) 
    >;
};`
class SomeClass{

private:
friend My_Trait<SomeClass>;
SomeFunc(){}
}

In summary need to declare Tick class as friend of SomeClass Thanks

IkoLogs avatar Mar 25 '19 07:03 IkoLogs