//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <functional>
// reference_wrapper
// reference_wrapper(const reference_wrapper<T>& x);
#include<functional>#include<cassert>classfunctor1:publicstd::unary_function<int,char>{};template<classT>voidtest(T&t){std::reference_wrapper<T>r(t);std::reference_wrapper<T>r2=r;assert(&r2.get()==&t);}voidf(){}intmain(){void(*fp)()=f;test(fp);test(f);functor1f1;test(f1);inti=0;test(i);constintj=0;test(j);}