• Adam Cozzette's avatar
    Fix initialization with Visual Studio · a9abc783
    Adam Cozzette authored
    It appears that Visual Studio does not work well with std::once_flag
    because it has a bug causing it to initialize that during dynamic
    initialization instead of constant initialization. This change works
    around the problem by using function static initializers instead.
    
    @gerben-s originally wrote this change for the Google-internal codebase
    but I am just cherry-picking it here.
    
    This fixes #4773.
    a9abc783
generated_message_reflection.cc 88.6 KB