minix/external/bsd/libc++/dist/libcxx/test/numerics/complex.number/complex/types.pass.cpp

37 lines
730 B
C++
Raw Normal View History

//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <complex>
// template<class T>
// class complex
// {
// public:
// typedef T value_type;
// ...
// };
#include <complex>
#include <type_traits>
template <class T>
void
test()
{
typedef std::complex<T> C;
static_assert((std::is_same<typename C::value_type, T>::value), "");
}
int main()
{
test<float>();
test<double>();
test<long double>();
}