Skip to content

Instantly share code, notes, and snippets.

Tomohiro Kashiwada kikairoya

Block or report user

Report or block kikairoya

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View himatubusi.cpp
#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> {
View make_array.cc
#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 >
View warn-cxx0x-implicit-copy-and-move.patch
--- 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)
You can’t perform that action at this time.