Commit c1545996 authored by Davis King's avatar Davis King

updated docs

parent 8b656240
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
<item>is_same_object</item> <item>is_same_object</item>
<item>assign_zero_if_built_in_scalar_type</item> <item>assign_zero_if_built_in_scalar_type</item>
<item>wrap_function</item> <item>wrap_function</item>
<item>DLIB_MAKE_HAS_MEMBER_FUNCTION_TEST</item>
</section> </section>
<section> <section>
...@@ -574,6 +575,33 @@ ...@@ -574,6 +575,33 @@
</component> </component>
<!-- ************************************************************************* -->
<component>
<name>DLIB_MAKE_HAS_MEMBER_FUNCTION_TEST</name>
<file>dlib/algs.h</file>
<spec_file link="true">dlib/algs.h</spec_file>
<description>
<p>
The DLIB_MAKE_HAS_MEMBER_FUNCTION_TEST() macro is used to define traits templates
that tell you if a class has a certain member function. For example, to make a
test to see if a class has a public method with the signature void print(int) you
would say:
</p>
<blockquote>
<tt>DLIB_MAKE_HAS_MEMBER_FUNCTION_TEST(has_print, void, print, (int))</tt>
</blockquote>
Then you can check if a class, T, has this method by looking at the boolean value:
<blockquote>
<tt>has_print&lt;T&gt;::value</tt>
</blockquote>
which will be true if the member function is in the T class.
</description>
</component>
<!-- ************************************************************************* --> <!-- ************************************************************************* -->
<component> <component>
......
...@@ -658,6 +658,7 @@ ...@@ -658,6 +658,7 @@
<term file="metaprogramming.html" name="is_const_type" include="dlib/algs.h"/> <term file="metaprogramming.html" name="is_const_type" include="dlib/algs.h"/>
<term file="metaprogramming.html" name="is_reference_type" include="dlib/algs.h"/> <term file="metaprogramming.html" name="is_reference_type" include="dlib/algs.h"/>
<term file="metaprogramming.html" name="is_same_type" include="dlib/algs.h"/> <term file="metaprogramming.html" name="is_same_type" include="dlib/algs.h"/>
<term file="metaprogramming.html" name="DLIB_MAKE_HAS_MEMBER_FUNCTION_TEST" include="dlib/algs.h"/>
<term file="metaprogramming.html" name="is_float_type" include="dlib/algs.h"/> <term file="metaprogramming.html" name="is_float_type" include="dlib/algs.h"/>
<term file="metaprogramming.html" name="is_same_object" include="dlib/algs.h"/> <term file="metaprogramming.html" name="is_same_object" include="dlib/algs.h"/>
<term file="metaprogramming.html" name="is_convertible" include="dlib/algs.h"/> <term file="metaprogramming.html" name="is_convertible" include="dlib/algs.h"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment