[LLVMbugs] [Bug 16661] New: problem with a method having a default value for an std::pair argument (works with g++)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jul 19 05:28:38 PDT 2013


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: unassignedclangbugs at nondot.org
          Reporter: slayoo at igf.fuw.edu.pl
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Hi,

Here's a short example:

slayoo at 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 at 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 at 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 at 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 at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130719/00957efe/attachment.html>


More information about the llvm-bugs mailing list