[Bug c++/88368] Improper ``use of deleted function''
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 5 13:48:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88368
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
#include <type_traits>
#include <utility>
template<class T>
union trivial_helper {
T t;
};
template <typename T>
struct trait {
static constexpr bool value =
std::is_copy_constructible<trivial_helper<T>>::value;
};
struct BlockFrequencyInfoImplBase {
struct BlockNode {
int Index = 1;
BlockNode() = default;
};
static constexpr bool v = trait<std::pair<BlockNode, int>>::value; // <<
remove this line to remove the error
void print() const {
BlockNode BB;
}
};
Testcase included inline. Used to be rejected e.g. in r210000, from r216750
and before r250994 used to be rejected with a different error.
More information about the Gcc-bugs
mailing list