Create a gist now

Instantly share code, notes, and snippets.

C++
#ifndef SMART_POINTER_H
#define SMART_POINTER_H
template <bool flag, typename T1, typename T2>
struct select_type
{
typedef T1 result;
};
template <typename T1, typename T2>
struct select_type<false, T1,T2>
{
typedef T2 result;
};
#ifndef SMART_POINTER_H
#define SMART_POINTER_H
template <bool flag, typename T1, typename T2>
struct select_type
{
typedef T1 result;
};
template <typename T1, typename T2>
struct select_type<false, T1,T2>
{
typedef T2 result;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment