This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <tuple> | |
#include <type_traits> | |
using std::tuple; | |
template <int n> | |
struct int_: std::integral_constant<int, n> { }; | |
typedef int_<0> zero_; | |
template <typename l> | |
struct decrement: int_<l::value-1> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <array> | |
#include <type_traits> | |
template <typename U, typename ...Args> | |
struct make_array_impl_ { | |
template <typename T, typename Void, typename NonVoid> | |
struct if_void_else { typedef NonVoid type; }; | |
template <typename Void, typename NonVoid> | |
struct if_void_else<void, Void, NonVoid> { typedef Void type; }; | |
template <typename T = void, typename ElemT = typename if_void_else<T, U, T>::type > |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/gcc/cp/class.c | |
+++ b/gcc/cp/class.c | |
@@ -3226,6 +3226,22 @@ check_field_decls (tree t, tree *access_decls, | |
warning (OPT_Weffc__, | |
" but does not override %<operator=(const %T&)%>", t); | |
} | |
+ if (cxx_dialect >= cxx0x | |
+ && (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) | |
+ || type_has_move_constructor (t) || type_has_move_assign (t)) | |
+ && !(TYPE_HAS_COPY_CTOR (t) && TYPE_HAS_COPY_ASSIGN (t) |