pointerOutput.hh

Go to the documentation of this file.
1 
6 #ifndef pointeroutput_hh
7 #define pointeroutput_hh
8 
9 #include "outputOperator.hh"
10 
11 namespace concepts {
12 
13  // ********************************************************** pointerOutput **
14 
15  template<class F>
16  void pointerOutput(std::ostream& os, const F& val) {
17  os << val;
18  }
19 
20  template<class F>
21  void pointerOutput(std::ostream& os, const F* val) {
22  if (val) os << "&" << *val; // pointer to value
23  else os << "0";
24  }
25 
26  template<class F>
27  void pointerOutput(std::ostream& os, F* val) {
28  if (val) os << "&" << *val; // pointer to value
29  else os << "0";
30  }
31 
32 } // namespace concepts
33 
34 #endif // pointeroutput_hh
void pointerOutput(std::ostream &os, const F &val)
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich