g++-4.8 -std=c++11 -O2 -Wall -pedantic -pthread main.cpp && ./a.out
main.cpp: In instantiation of 'decltype (((typeid(T) == typeid(int)) ? get<T>(variant) : bar)) foo(const boost::variant<int, double>&, double) [with T = int; decltype (((typeid(T) == typeid(int)) ? get<T>(variant) : bar)) = double]':
main.cpp:14:26: required from here
main.cpp:6:6: sorry, unimplemented: mangling typeid_expr
auto foo(const boost::variant<int, double>& variant, double bar) -> decltype(typeid(T) == typeid(int) ? boost::get<T>(variant) : bar)
^
main.cpp:6:6: sorry, unimplemented: mangling typeid_expr