On Thu, Feb 26, 2015 at 11:13 AM, Joaquin M Lopez Munoz
Marcel Raad
writes: Ben Pope
writes: multi_index:test_key_extractors:msvc-14.0
This I strongly suspect is a compiler bug. I've tried reducing the problem to a simple test case but it works in webcompiler.cloudapp.net with version 19.00.22620:
#include
template
struct if_{using type=T1;}; template
struct if_ {using type=T2;}; template
struct const_member_base{using result_type=Type;}; template
struct non_const_member_base{using result_type=Type;}; template
struct member: if_< std::is_const<Type>::value, const_member_base , non_const_member_base ::type { };
struct X { int x; };
int main() { member
t; } Maybe someone can try with version 19.00.22609, which is what teeks99-08f-win2012R2-64on64 is running? If it fails, then we have a compiler bug fixed on mainline.
I ran it on that same machine (with 19.00.22609) and it gave the following
error.
Tom
1>------ Build started: Project: ComplierBugTest, Configuration: Debug
Win32 ------
1> main.cpp
1>c:\users\boost\documents\visual studio
2015\projects\complierbugtest\main.cpp(19): error C2975: 'PtrToMember':
invalid template argument for 'const_member_base', expected compile-time
constant expression
1> c:\users\boost\documents\visual studio
2015\projects\complierbugtest\main.cpp(9): note: see declaration of
'PtrToMember'
1> c:\users\boost\documents\visual studio
2015\projects\complierbugtest\main.cpp(32): note: see reference to class
template instantiation 'member