.. _program_listing_file__tmp_ws_src_ecl_core_ecl_concepts_include_ecl_concepts_nullary_function.hpp: Program Listing for File nullary_function.hpp ============================================= |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/ecl_core/ecl_concepts/include/ecl/concepts/nullary_function.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /***************************************************************************** ** Ifdefs *****************************************************************************/ #ifndef ECL_CONCEPTS_NULLARY_FUNCTION_HPP_ #define ECL_CONCEPTS_NULLARY_FUNCTION_HPP_ /***************************************************************************** ** Includes *****************************************************************************/ #include #include "macros.hpp" /***************************************************************************** ** Namespaces *****************************************************************************/ namespace ecl { /***************************************************************************** ** Concept [Container] *****************************************************************************/ template class NullaryFunctionConcept { public: ecl_compile_time_concept_test(NullaryFunctionConcept) { typedef typename Implementation::result_type ECL_UNUSED return_type; function(); // Unfortunately we can't test for the result type to match a certain value here // as this would then have 2 template arguments with a separating comma. That throws // the compile_time_concept_check macro into thinking it has two macro arguments. } private: // Putting instantiations here actually saves instantiation (which can cause a // problem if there is no default constructor). Implementation function; }; } // namespace ecl #endif /* ECL_CONCEPTS_NULLARY_FUNCTION_HPP_ */