Operator "~", decltype() and templates.

2015-02-17 Thread Paweł Tomulik
Hi, the following program does not compile with g++4.9.2: #include template auto tt(T x) -> decltype(~x) // <-- here { return ~x; } int main() { std::cout << tt(10) << std::endl; return EXIT_SUCCESS; } ptomulik@tea:$ g++ -std=c++11 -g -O0 -Wall -Wextra -Werror -pedantic -o test-gcc test.

Re: Operator "~", decltype() and templates.

2015-02-17 Thread Jonathan Wakely
On 17 February 2015 at 15:10, Paweł Tomulik wrote: > Is this a bug? The original program compiles with clang. Yes, please report it as described at https://gcc.gnu.org/bugs/ In any case, "is this a bug?" questions are inappropriate on this mailing list, they belong on the gcc-help list.