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.

gcc@gcc.gnu.org

2015-02-13 Thread Paweł Tomulik
eturn EXIT_SUCCESS; } When compiled with clang and run it produces SIGILL: ptomulik@tea:$ clang++ -std=c++11 -g -O0 -o test test.cpp ptomulik@tea:$ ./test I attach patch created with git against the "gcc-4_9_2-release" tag. Best regards. -- Paweł Tomulik, tel. (22) 234 7925 Instytut Te