Question: 8. (Simple Switchable Bridge Functionality) We create a template function that supports both pointers and reference types. If it is a pointer it is dereferenced
8. (Simple Switchable Bridge Functionality)
We create a template function that supports both pointers and reference types. If it is a pointer it is dereferenced and then printed while if it is not a pointer type and if it is a scalar reference type then it is printed directly. Use the is_pointer() function in conjunction with std::true_type and std::false_type to determine which implementation to call.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
