Author
anonymous
almost 6 years ago
Language
C++
Compiler
gcc HEAD 9.0.1 20190317 (experimental)
Options
Warnings
Boost 1.69.0
C++17
no pedantic
Author
anonymous
almost 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.69.0/gcc-head/include -std=c++17
prog.cc:29:23: error: need 'typename' before 'std::conditional<std::is_pointer<_Tp>::value, std::nullptr_t, std::integral_constant<long unsigned int, 18446744073709551615> >::type' because 'std::conditional<std::is_pointer<_Tp>::value, std::nullptr_t, std::integral_constant<long unsigned int, 18446744073709551615> >' is a dependent scope
29 | using bad_t = std::conditional< std::is_pointer<E>::value, badptr_t, badsize_t>::type; // <-- location of ::type
| ^~~
| typename
prog.cc:30:40: error: there are no arguments to 'bad_t' that depend on a template parameter, so a declaration of 'bad_t' must be available [-fpermissive]
30 | static constexpr E freelist_null = bad_t(); // <-- location of ::type
| ^~~~~
prog.cc:30:40: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
prog.cc: In instantiation of 'constexpr void* const Freelist<FreelistType::vector, void*>::freelist_null':
prog.cc:68:22: required from here
prog.cc:30:45: error: 'bad_t' was not declared in this scope
30 | static constexpr E freelist_null = bad_t(); // <-- location of ::type
| ~~~~~^~
prog.cc: In instantiation of 'constexpr const long unsigned int Freelist<FreelistType::vector, long unsigned int>::freelist_null':
prog.cc:69:22: required from here
prog.cc:30:45: error: 'bad_t' was not declared in this scope
Exit Code:
1