old_friend_lookup

Implements non-standard C++ friend declaration behavior that allows friend declarations to be visible in the enclosing scope.

#pragma old_friend_lookup on | off | reset
  
Example

This example shows friend declarations that are invalid without #pragma old_friend_lookup.

Listing 1. Valid and invalid declarations without #pragma old_friend_lookup
class C2;
void f2();

struct S {

     friend class C1;

     friend class C2;

     friend void f1();

     friend void f2();

};

C1 *cp1;    // error, C1 is not visible without namespace declaration

C2 *cp2;    // OK

int main()

{

     f1();  // error, f1() is not visible without namespace declaration

     f2();  // OK

}
Related information
access_errors
always_inline
arg_dep_lookup
ARM_conform
ARM_scoping
array_new_delete
auto_inline
bool
cplusplus
cpp1x
cpp_extensions
debuginline
def_inherited
defer_codegen
defer_defarg_parsing
direct_destruction
direct_to_som
dont_inline
ecplusplus
exceptions
inline_bottom_up
inline_bottom_up_once
inline_depth
inline_max_auto_size
inline_max_size
inline_max_total_size
internal
iso_templates
new_mangler
no_conststringconv
no_static_dtors
nosyminline
old_pods
old_vtable
opt_classresults
parse_func_templ
parse_mfunc_templ
RTTI
suppress_init_code
template_depth
thread_safe_init
warn_hidevirtual
warn_no_explicit_virtual
warn_no_typename
warn_notinlined
warn_structclass
wchar_type