concepts/streams.hpp
Go to the documentation of this file.
1 
8 /*****************************************************************************
9 ** Ifdefs
10 *****************************************************************************/
11 
12 #ifndef ECL_CONCEPTS_STREAMS_HPP_
13 #define ECL_CONCEPTS_STREAMS_HPP_
14 
15 /*****************************************************************************
16 ** Includes
17 *****************************************************************************/
18 
19 #include "macros.hpp"
20 
21 /*****************************************************************************
22 ** Namespaces
23 *****************************************************************************/
24 
25 namespace ecl {
26 
27 /*****************************************************************************
28 ** Concept [Stream]
29 *****************************************************************************/
30 
37 template <typename Implementation>
38 class StreamConcept {
39  public:
40 
49  ecl_compile_time_concept_test(StreamConcept)
50  {
51  stream << 'a';
52  stream.flush();
53  }
54 
55  private:
56  // Putting instantiations here actually saves instantiation (which can cause a
57  // problem if there is no default constructor).
58  Implementation stream;
59 };
60 
61 }; // namespace ecl
62 
63 #endif /* ECL_CONCEPTS_STREAMS_HPP_ */
Implementation stream
ecl_compile_time_concept_test(StreamConcept)


xbot_node
Author(s): Roc, wangpeng@droid.ac.cn
autogenerated on Sat Oct 10 2020 03:28:13