streams.hpp
Go to the documentation of this file.
00001 
00008 /*****************************************************************************
00009 ** Ifdefs
00010 *****************************************************************************/
00011 
00012 #ifndef ECL_CONCEPTS_STREAMS_HPP_
00013 #define ECL_CONCEPTS_STREAMS_HPP_
00014 
00015 /*****************************************************************************
00016 ** Includes
00017 *****************************************************************************/
00018 
00019 #include "macros.hpp"
00020 
00021 /*****************************************************************************
00022 ** Namespaces
00023 *****************************************************************************/
00024 
00025 namespace ecl {
00026 
00027 /*****************************************************************************
00028 ** Concept [Stream]
00029 *****************************************************************************/
00030 
00037 template <typename Implementation>
00038 class StreamConcept {
00039     public:
00040 
00049                 ecl_compile_time_concept_test(StreamConcept)
00050         {
00051                 stream << 'a';
00052                 stream.flush();
00053         }
00054 
00055     private:
00056         // Putting instantiations here actually saves instantiation (which can cause a
00057         // problem if there is no default constructor).
00058         Implementation stream;
00059 };
00060 
00061 }; // namespace ecl
00062 
00063 #endif /* ECL_CONCEPTS_STREAMS_HPP_ */


ecl_concepts
Author(s): Daniel Stonier
autogenerated on Wed Aug 26 2015 11:27:09