https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67910
--- Comment #2 from Guille <guille at cal dot berkeley.edu> --- struct A {}; struct B {}; static auto f(auto b) -> A { return A(); } // error: could not convert 'A()' from 'A' to 'B' int main() { A a = f(B()); // error: conversion from 'B' to non-scalar type 'A' requested return 0; }