http://llvm.org/bugs/show_bug.cgi?id=16661

            Bug ID: 16661
           Summary: problem with a method having a default value for an
                    std::pair argument (works with g++)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Hi,

Here's a short example:

slayoo@skua:~$ clang++ --version
Debian clang version 3.4-1 (trunk) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix



slayoo@skua:~$ cat test.cpp 
#include <utility>
struct c
{
  static void f(
    std::pair<const double*, const int*> = std::pair<const double*, const
int*>(0,0)
  ) {}
};



slayoo@skua:~$ clang++ -c test.cpp 
test.cpp:5:79: error: expected ')'
    std::pair<const double*, const int*> = std::pair<const double*, const
int*>(0,0)
                                                                              ^
test.cpp:4:16: note: to match this '('
  static void f(
               ^
test.cpp:5:67: error: expected '>'
    std::pair<const double*, const int*> = std::pair<const double*, const
int*>(0,0)
                                                                  ^
2 errors generated.


slayoo@skua:~$ g++ --version
g++ (Debian 4.7.3-5) 4.7.3
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



slayoo@skua:~$ g++ -c test.cpp && echo OK
OK



HTH,
Sylwester

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to