Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
std::complex::real(3)	      C++ Standard Libary	 std::complex::real(3)

NAME
       std::complex::real - std::complex::real

Synopsis
	  primary template
	  complex<T>
	  T real() const;	   (until
				   C++14)
	  constexpr T		   (since
	  real() const;		   C++14)
	  void real( T			   (until
	  value	);			   C++20)
	  constexpr void		   (since
	  real(	T value	);		   C++20)
	  specialization
	  complex<float>
	  float	real()				   (until
	  const;				   C++11)
	  constexpr float			   (since
	  real() const;				   C++11)
	  void real( float				   (until
	  value	);					   C++20)
	  constexpr void				   (since
	  real(	float					   C++20)
	  value	);
	  specialization
	  complex<double>
	  double real()	   (1)					   (until
	  const;						   C++11)
	  constexpr double     (2)				   (since
	  real() const;						   C++11)
	  void real(							  (un-
       til
	  double	       value		  );			   (1)
       C++20)
	  constexpr							  void
       (since
	  real(			double					   (2)
       C++20)
	  value	);
	  specialization
	  complex<long				   (1)
	  double>
	  long	       double						   (2)
       (until
	  real()							const;
       C++11)
	  constexpr							  long
       (since
	  double							real()
       C++11)
	  const;						   (1)
	  void				 real(				  long
       (until
	  double			    value			    );
       C++20)
	  constexpr void						   (2)
       (since
	  real(								  long
       C++20)
	  double value );

	  Accesses the real part of the	complex	number.

	  1) Returns the real part.
	  2) Sets the real part	to value.

Parameters
	  value	- the value to set the real part to

Return value
	  1) The real part.
	  2) (none)

Notes
	  In C++11, overload (1) in complex specializations used to be	speci-
       fied without const
	  qualifier.  However,	in C++11, a constexpr specifier	used in	a non-
       static member
	  function implies const, and thus the behavior	 is  as	 if  const  is
       specified.

See also
	  real returns the real	component
	       (function template)
	  imag accesses	the imaginary part of the complex number
	       (public member function)

http://cppreference.com		  2022.07.31		 std::complex::real(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::complex::real&sektion=3&manpath=FreeBSD+Ports+15.0>

home | help