[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-bugs
Subject:    [Bug 302510] New: KDevelop errors out on user-defined string literal operators
From:       Alexander <ashaduri () gmail ! com>
Date:       2012-06-25 14:35:59
Message-ID: bug-302510-40295 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=302510

            Bug ID: 302510
          Severity: normal
           Version: git master
          Priority: NOR
          Assignee: kdevelop-bugs@kdevelop.org
           Summary: KDevelop errors out on user-defined string literal
                    operators
    Classification: Unclassified
                OS: Linux
          Reporter: ashaduri@gmail.com
          Hardware: Compiled Sources
            Status: UNCONFIRMED
         Component: Language Support: CPP
           Product: kdevelop

I'm using KDevelop git master (2012-06-25).
Consider the following code:

#include <chrono>
constexpr std::chrono::nanoseconds operator"" _nsec(unsigned long long val)
{
    return std::chrono::nanoseconds(val);
}

The "constexpr..." line is highlighted in red, with the following errors in the
Problems tool view:
"Unexpected token 'string literal'", "Unexpected token 'operator'".

See http://en.wikipedia.org/wiki/C%2B%2B11#User-defined_literals for more info.

Thanks

Reproducible: Always

Steps to Reproduce:
1. Try the code sample

Actual Results:  
KDevelop shows errors

Expected Results:  
There shouldn't be any errors. Even better, KDevelop should treat the
user-defined string literals as values having the types returned by respective
operators defined in current namespace.

openSUSE 12.1 x86-64, gcc 4.7.1.

-- 
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic