It's officially not! By definition! Because I've found this in sourcecode written by THE man himself: Dennis Ritchie
If he does it, it's fine. Just because.
P.S.: If you don't know who Dennis Ritchie was, delete your account and leave this Forum!
#include <iostream>
#include <type_traits>
void foo(int i){ std::cout << "foo: " << i + 10 << std::endl; }
void bar(int i){ std::cout << "bar: " << i * 2 << std::endl; }
int main()
{
// only C++ : If the second and third operands are glvalues of the same value category
// and have the same type, the result is of that type and value category
auto& reference_to_function = true ? foo : bar ; // C++
static_assert( std::is_same< decltype((reference_to_function)), void(&)(int) >::value, "must be reference to function" ) ;
reference_to_function(42) ;
//////////////////////////////////////////////////////////////////////////
void (*pointer_to_function)(int) = false ? foo : bar ; // function-to-pointer standard conversion
pointer_to_function(42) ;
}