[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gtags: failed to parse template
From: |
Lorenz Hübschle-Schneider |
Subject: |
gtags: failed to parse template |
Date: |
Tue, 30 Aug 2016 16:45:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.2.0 |
Dear all,
GNU global 6.5.4 has trouble with the following template specialisation snippet:
template <typename T>
struct Foo<typename std::enable_if<sizeof(T) <= 2* sizeof(size_t)>::type>
{};
gtags: failed to parse template [+2 ./foo.cpp].
If I use "<" instead of "<=" it still fails, but it works if I use ">". It's
probably not expecting operator< to appear inside a template.
Cheers,
Lorenz
Full file, valid C++11:
#include <type_traits>
template <typename T, typename Enable = void>
struct Foo{};
template <typename T>
struct Foo<T, typename std::enable_if<(sizeof(T) < 8)>::type>
{};
int main(void) {
Foo<int> foo;
}
- fails on line 7
- gtags: failed to parse template,
Lorenz Hübschle-Schneider <=