Reduce Beast dependencies by leveraging C++11 features:

* Remove beast::Atomic (RIPD-728):
  * Use std-provided alternatives
  * Eliminate atomic variables where possible

* Cleanup beast::Thread interface:
  * Use std::string instead of beast::String
  * Remove unused functions and parameters

* Remove unused code:
  * beast::ThreadLocalValue
  * beast::ServiceQueue
This commit is contained in:
Nik Bougalis
2014-12-22 02:45:36 -08:00
parent c01b4e6baa
commit 1d6721d345
20 changed files with 47 additions and 2229 deletions

View File

@@ -25,10 +25,9 @@
#define BEAST_CHARPOINTER_UTF16_H_INCLUDED
#include <beast/Config.h>
#include <beast/Atomic.h>
#include <beast/strings/CharacterFunctions.h>
#include <atomic>
#include <cstdint>
namespace beast {
@@ -474,7 +473,7 @@ public:
/** Atomically swaps this pointer for a new value, returning the previous value. */
CharPointer_UTF16 atomicSwap (const CharPointer_UTF16 newValue)
{
return CharPointer_UTF16 (reinterpret_cast <Atomic<CharType*>&> (data).exchange (newValue.data));
return CharPointer_UTF16 (reinterpret_cast <std::atomic<CharType*>&> (data).exchange (newValue.data));
}
/** These values are the byte-order-mark (BOM) values for a UTF-16 stream. */