#ifndef __CHAR16PTR_H__
#define __CHAR16PTR_H__
-#include <cstddef>
#include "unicode/utypes.h"
+#if U_SHOW_CPLUSPLUS_API
+
+#include <cstddef>
+
/**
* \file
* \brief C++ API: char16_t pointer wrappers with
* Also conversion functions from char16_t * to UChar * and OldUChar *.
*/
-#if U_SHOW_CPLUSPLUS_API
U_NAMESPACE_BEGIN
/**
// Use the predefined value.
#elif (defined(__clang__) || defined(__GNUC__)) && U_PLATFORM != U_PF_BROWSER_NATIVE_CLIENT
# define U_ALIASING_BARRIER(ptr) asm volatile("" : : "rm"(ptr) : "memory")
+#elif defined(U_IN_DOXYGEN)
+# define U_ALIASING_BARRIER(ptr)
#endif
/**
#endif
};
+/// \cond
#ifdef U_ALIASING_BARRIER
Char16Ptr::Char16Ptr(char16_t *p) : p_(p) {}
char16_t *Char16Ptr::get() const { return u_.cp; }
#endif
+/// \endcond
/**
* const char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types.
#endif
};
+/// \cond
#ifdef U_ALIASING_BARRIER
ConstChar16Ptr::ConstChar16Ptr(const char16_t *p) : p_(p) {}
const char16_t *ConstChar16Ptr::get() const { return u_.cp; }
#endif
+/// \endcond
/**
* Converts from const char16_t * to const UChar *.
}
U_NAMESPACE_END
-#endif // U_SHOW_CPLUSPLUS_API
+
+#endif /* U_SHOW_CPLUSPLUS_API */
#endif // __CHAR16PTR_H__