public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50864] New: SFINAE bug
@ 2011-10-25 13:35 fate66260 at gmail dot com
  2011-10-25 14:26 ` [Bug c++/50864] " paolo.carlini at oracle dot com
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: fate66260 at gmail dot com @ 2011-10-25 13:35 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50864
           Summary: SFINAE bug
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: fate66260@gmail.com


[C++0x] 
compiler option: -Wall -std=c++0x -O3

error message:
internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

source code:
namespace concept_impl {

template < class lhs, class rhs >
struct is_arrow_operable_impl
{
private:
  template < class T = lhs, class U = rhs
           , class = decltype(std::declval<T>() -> std::declval<U>()) // <-
here
           >
  static mpl::true_
  test (int);

  template < class... >
  static mpl::false_
  test (...);

public:
  typedef decltype(test (0)) type;
};


} // namespace concept_impl

template < class lhs, class rhs >
struct is_arrow_operable
  : public concept_impl::is_arrow_operable_impl<lhs, rhs>::type
{ };

// test type
struct foo
{
  int* p;
};

// call this meta function
static_assert(is_arrow_dereferencable<foo*, int* foo::*>::value ,"error");


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2011-11-08 10:34 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-25 13:35 [Bug c++/50864] New: SFINAE bug fate66260 at gmail dot com
2011-10-25 14:26 ` [Bug c++/50864] " paolo.carlini at oracle dot com
2011-10-25 14:30 ` paolo.carlini at oracle dot com
2011-10-25 15:00 ` fate66260 at gmail dot com
2011-10-25 15:02 ` paolo.carlini at oracle dot com
2011-10-25 15:45 ` paolo.carlini at oracle dot com
2011-10-25 17:05 ` [Bug c++/50864] [4.6/4.7 Regression] ICE with decltype and "declval" from another namespace paolo.carlini at oracle dot com
2011-10-25 17:15 ` paolo.carlini at oracle dot com
2011-10-25 18:09 ` daniel.kruegler at googlemail dot com
2011-10-25 18:27 ` paolo.carlini at oracle dot com
2011-10-25 18:29 ` daniel.kruegler at googlemail dot com
2011-10-25 19:18 ` daniel.kruegler at googlemail dot com
2011-10-26 19:48 ` paolo.carlini at oracle dot com
2011-10-27  9:30 ` rguenth at gcc dot gnu.org
2011-10-27 11:45 ` rguenth at gcc dot gnu.org
2011-10-28 18:40 ` paolo at gcc dot gnu.org
2011-10-28 18:42 ` [Bug c++/50864] [4.6 " paolo.carlini at oracle dot com
2011-10-29  0:09 ` [Bug c++/50864] [4.6/4.7 " paolo.carlini at oracle dot com
2011-10-29  0:32 ` paolo.carlini at oracle dot com
2011-11-08 10:25 ` paolo at gcc dot gnu.org
2011-11-08 10:36 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).