Author
anonymous
over 6 years ago
Language
C++
Compiler
gcc HEAD 9.0.0 20181122 (experimental)
Options
Warnings
Boost 1.68.0
C++2a(GNU)
no pedantic
Author
anonymous
over 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-head/include -std=gnu++2a
prog.cc: In substitution of 'template<class T, class U> using has_dtor = decltype (declval<U&>().~ U()) [with T = int&; U = int&]':
/opt/wandbox/gcc-head/include/c++/9.0.0/experimental/type_traits:239:71: recursively required by substitution of 'template<class _Default, template<class ...> class _Op, class ... _Args> struct std::__detector<_Default, std::__void_t<_Op<_Args ...> >, _Op, _Args ...> [with _Default = std::experimental::fundamentals_v2::nonesuch; _Op = has_dtor; _Args = {int&}]'
/opt/wandbox/gcc-head/include/c++/9.0.0/experimental/type_traits:239:71: required by substitution of 'template<template<class ...> class _Op, class ... _Args> using is_detected = typename std::__detector<std::experimental::fundamentals_v2::nonesuch, void, _Op, _Args ...>::value_t [with _Op = has_dtor; _Args = {int&}]'
/opt/wandbox/gcc-head/include/c++/9.0.0/experimental/type_traits:242:18: required from 'constexpr const bool std::experimental::fundamentals_v2::is_detected_v<template<class T, class U> using has_dtor = decltype (declval<U&>().~ U()), int&>'
prog.cc:181:24: required from 'constexpr const bool is_destructible_v<int&>'
prog.cc:186:45: required from 'struct is_destructible<int&>'
prog.cc:227:37: required from here
prog.cc:177:47: error: 'std::declval<int&>()' is not of type 'int&'
177 | using has_dtor = decltype(std::declval<U&>().~U());
| ~~~~~~~~~~~~~~~~~~~~^
prog.cc: In substitution of 'template<class T, class U> using has_dtor = decltype (declval<U&>().~ U()) [with T = int&&; U = int&&]':
/opt/wandbox/gcc-head/include/c++/9.0.0/experimental/type_traits:239:71: recursively required by substitution of 'template<class _Default, template<class ...> class _Op, class ... _Args> struct std::__detector<_Default, std::__void_t<_Op<_Args ...> >, _Op, _Args ...> [with _Default = std::experimental::fundamentals_v2::nonesuch; _Op = has_dtor; _Args = {int&&}]'
/opt/wandbox/gcc-head/include/c++/9.0.0/experimental/type_traits:239:71: required by substitution of 'template<template<class ...> class _Op, class ... _Args> using is_detected = typename std::__detector<std::experimental::fundamentals_v2::nonesuch, void, _Op, _Args ...>::value_t [with _Op = has_dtor; _Args = {int&&}]'
/opt/wandbox/gcc-head/include/c++/9.0.0/experimental/type_traits:242:18: required from 'constexpr const bool std::experimental::fundamentals_v2::is_detected_v<template<class T, class U> using has_dtor = decltype (declval<U&>().~ U()), int&&>'
prog.cc:181:24: required from 'constexpr const bool is_destructible_v<int&&>'
prog.cc:186:45: required from 'struct is_destructible<int&&>'
prog.cc:228:38: required from here
prog.cc:177:47: error: 'std::declval<int&>()' is not of type 'int&&'
Exit Code:
1