diff --git a/doc/html/boost_typetraits/reference.html b/doc/html/boost_typetraits/reference.html index 668a724..83f7ba1 100644 --- a/doc/html/boost_typetraits/reference.html +++ b/doc/html/boost_typetraits/reference.html @@ -108,6 +108,7 @@
is_assignable
is_base_of
is_class
+
is_complete
is_complex
is_compound
is_const
diff --git a/doc/html/boost_typetraits/reference/is_class.html b/doc/html/boost_typetraits/reference/is_class.html index 480364a..ce40913 100644 --- a/doc/html/boost_typetraits/reference/is_class.html +++ b/doc/html/boost_typetraits/reference/is_class.html @@ -7,7 +7,7 @@ - + @@ -20,7 +20,7 @@

-PrevUpHomeNext +PrevUpHomeNext

@@ -93,7 +93,7 @@
-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/boost_typetraits/reference/is_complete.html b/doc/html/boost_typetraits/reference/is_complete.html new file mode 100644 index 0000000..6a5fe82 --- /dev/null +++ b/doc/html/boost_typetraits/reference/is_complete.html @@ -0,0 +1,79 @@ + + + +is_complete + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +
template <class T>
+struct is_complete : public true_type-or-false_type {};
+
+

+ Inherits: If T + is a complete type then inherits from true_type, + otherwise inherits from false_type. +

+
+ + + + + +
[Important]Important

+ This trait is designed for one use only: to trigger a hard error (via a + static_assert) when a template + is accidentally instantiated on an incomplete type. Any other use case + will cause ODR violations as the "completeness" of type T may vary at different points in the + current translation unit, as well as across translations units. In particular this trait should never ever be used to change + code paths depending on the completeness of a type. +

+

+ Header: #include + <boost/type_traits/is_complete.hpp> + or #include <boost/type_traits.hpp> +

+

+ Compiler Compatibility: Requires C++11 SFINAE-expressions + to function fully. The macro BOOST_TT_HAS_WORKING_IS_COMPLETE + is defined when the trait is fully functional. +

+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/html/boost_typetraits/reference/is_complex.html b/doc/html/boost_typetraits/reference/is_complex.html index 684b36c..5668e28 100644 --- a/doc/html/boost_typetraits/reference/is_complex.html +++ b/doc/html/boost_typetraits/reference/is_complex.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@
-PrevUpHomeNext +PrevUpHomeNext

@@ -62,7 +62,7 @@
-PrevUpHomeNext +PrevUpHomeNext
diff --git a/doc/html/index.html b/doc/html/index.html index 7e6d1f5..7785e78 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -164,6 +164,7 @@
is_assignable
is_base_of
is_class
+
is_complete
is_complex
is_compound
is_const
diff --git a/doc/html/index/s11.html b/doc/html/index/s11.html index 51c8a37..3007515 100644 --- a/doc/html/index/s11.html +++ b/doc/html/index/s11.html @@ -24,7 +24,7 @@

-Class Index

+Class Index

A C D E F H I M N O P R T

@@ -232,6 +232,7 @@
  • User Defined Specializations

  • +
  • is_complete

  • is_complex

  • is_compound

  • is_const

  • diff --git a/doc/html/index/s12.html b/doc/html/index/s12.html index df18fb5..aa6adbb 100644 --- a/doc/html/index/s12.html +++ b/doc/html/index/s12.html @@ -24,7 +24,7 @@

    -Typedef Index

    +Typedef Index

    F R T V

    diff --git a/doc/html/index/s13.html b/doc/html/index/s13.html index 6fca6f7..a8db2be 100644 --- a/doc/html/index/s13.html +++ b/doc/html/index/s13.html @@ -24,7 +24,7 @@

    -Macro Index

    +Macro Index

    B

    @@ -168,6 +168,10 @@
  • +

    BOOST_TT_HAS_WORKING_IS_COMPLETE

    + +
  • +
  • BOOST_TT_IS_CONSTRUCTIBLE_CONFORMING

  • diff --git a/doc/html/index/s14.html b/doc/html/index/s14.html index 2bf95cd..6727001 100644 --- a/doc/html/index/s14.html +++ b/doc/html/index/s14.html @@ -23,7 +23,7 @@

    -Index

    +Index

    A B C D E F H I M N O P R T U V

    @@ -199,6 +199,10 @@
  • +

    BOOST_TT_HAS_WORKING_IS_COMPLETE

    + +
  • +
  • BOOST_TT_IS_CONSTRUCTIBLE_CONFORMING

  • @@ -208,6 +212,10 @@
    • +

      check

      + +
    • +
    • common_type

    • +
    • +

      is_complete

      + +
    • is_complex

    • is_compound

    • is_const

    • @@ -871,6 +886,7 @@

      Operator Type Traits

      • any

      • +
      • check

      • dont_care

      • has_equal_to

      • has_operator

      • diff --git a/doc/is_complete.qbk b/doc/is_complete.qbk new file mode 100644 index 0000000..9624e16 --- /dev/null +++ b/doc/is_complete.qbk @@ -0,0 +1,29 @@ +[/ + Copyright 2018 John Maddock. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt). +] + +[section:is_complete is_complete] + + template + struct is_complete : public __tof {}; + +__inherit If `T` is a complete type then inherits from __true_type, +otherwise inherits from __false_type. + +[important This trait is designed for one use only: to trigger a hard error (via a `static_assert`) when a template +is accidentally instantiated on an incomplete type. Any other use case will cause ODR violations as the "completeness" +of type `T` may vary at different points in the current translation unit, as well as across translations units. +['[*In particular this trait should never ever be used to change code paths depending on the completeness of a type]].] + +__header ` #include ` or ` #include ` + +__compat Requires C++11 SFINAE-expressions to function fully. The macro `BOOST_TT_HAS_WORKING_IS_COMPLETE` is defined +when the trait is fully functional. + +[endsect] + + + diff --git a/doc/type_traits.qbk b/doc/type_traits.qbk index b751f9f..757ca99 100644 --- a/doc/type_traits.qbk +++ b/doc/type_traits.qbk @@ -291,6 +291,7 @@ See __has_trivial_constructor. [include is_assignable.qbk] [include is_base_of.qbk] [include is_class.qbk] +[include is_complete.qbk] [include is_complex.qbk] [include is_compound.qbk] [include is_const.qbk]