Macros not specifying global namespace


i’m getting some of these errors, namely in juce_Memory.h (don’t look at amalgamated lines, they have changed in my build):

juce_amalgamated.cpp(6649) : error C2668: 'juce::memset' : ambiguous call to overloaded function
        C:\VCToolkit\PlatformSDK\Include\crt\memory.h(76): could be 'void *juce::memset(void *,int,size_t)'
        C:\VCToolkit\PlatformSDK\Include\crt\string.h(94): or       'void *memset(void *,int,size_t)' [found using argument-dependent lookup]
        while trying to match the argument list '(sockaddr_in *, int, unsigned int)'

i think macro like juce_malloc, juce_free, … and zeromem … should specify the calls to stdlib functions as if they are in the global namespace:

/** Clears a block of memory. */
#define zeromem(memory, numBytes)               ::memset (memory, 0, numBytes)

/** Clears a reference to a local structure. */
#define zerostruct(structure)                   ::memset (&structure, 0, sizeof (structure))

this way no more errors.


There should be no such thing as juce::memset… Maybe you’ve accidentally included a std C header file inside a juce namespace somewhere?


yeah could be… i’ll double check, thanx