PSR
CHIVE
Ask a Question
Search
PSR
CHIVE:
powered by
FreeFind
Home
Install
Use
Develop
Support
News
Credits
hosted by
Util
units
complex_public.h
1
//-*-C++-*-
2
/***************************************************************************
3
*
4
* Copyright (C) 2006 by Willem van Straten
5
* Licensed under the Academic Free License version 2.1
6
*
7
***************************************************************************/
8
// psrchive/Util/units/complex_public.h
9
10
#ifndef __complex_public
11
#define __complex_public
12
13
#include <complex>
14
16
template
<
class
T>
17
class
complex_public
{
18
public
:
19
T real;
20
T imag;
21
};
22
23
template
<
class
T>
24
complex_public<T>
& pub (std::complex<T>& c)
25
{
26
return
*
reinterpret_cast<
complex_public<T>
*
>
( &c );
27
}
28
29
template
<
class
T>
30
const
complex_public<T>
& pub (
const
std::complex<T>& c)
31
{
32
return
*
reinterpret_cast<
const
complex_public<T>
*
>
( &c );
33
}
34
35
#endif
complex_public
simple template used to provide public access to std::complex::real|imag
Definition
complex_public.h:17
Generated using
doxygen
1.14.0