This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/51185] New: [C++0x] false-positive results of std::is_constructible


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51185

             Bug #: 51185
           Summary: [C++0x] false-positive results of
                    std::is_constructible
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ai.azuma@gmail.com


All of the static_asserts in the following code result in compile error with
-std=c++11.


////////////////////////////////////////
#include <type_traits>

struct A{};
struct B : A{};

int main()
{
  static_assert(!std::is_constructible<B &&, A>(), "");
  static_assert(!std::is_constructible<B const &&, A>(), "");
  static_assert(!std::is_constructible<B const &&, A const>(), "");
  static_assert(!std::is_constructible<B volatile &&, A>(), "");
  static_assert(!std::is_constructible<B volatile &&, A volatile>(), "");
  static_assert(!std::is_constructible<B const volatile &&, A>(), "");
  static_assert(!std::is_constructible<B const volatile &&, A const>(), "");
  static_assert(!std::is_constructible<B const volatile &&, A volatile>(), "");
  static_assert(!std::is_constructible<B const volatile &&, A const
volatile>(), "");
}
////////////////////////////////////////


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]