Created
October 5, 2011 23:28
-
-
Save KushalP/1266046 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace base { | |
| namespace mac { | |
| template<typename T> T CFCast(CFTypeRef cf_val) { | |
| if (!cf_val) return NULL; | |
| if (CFGetTypeID(cf_val) == CFStringGetTypeID()) { | |
| return (CFStringRef)cf_val; | |
| } | |
| return NULL; | |
| } | |
| } // namespace mac | |
| } // namespace base |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace base { | |
| mac { | |
| template<typename T> T CFCast(CFTypeRef cf_val); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LINK(target) out/Debug/base_unittests | |
| Undefined symbols: | |
| "__ZN4base3mac6CFCastIPK10__CFStringEET_PKv", referenced from: | |
| __ZN29CFCastTest_ToCFStringRef_Test8TestBodyEv in foundation_util_unittest.o | |
| "__ZN4base3mac6CFCastIPK14__CFDictionaryEET_PKv", referenced from: | |
| __ZN33CFCastTest_ToCFDictionaryRef_Test8TestBodyEv in foundation_util_unittest.o | |
| ld: symbol(s) not found | |
| clang: error: linker command failed with exit code 1 (use -v to see invocation) | |
| LINK(target) out/Debug/base_unittests: Finished |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment