diff --git a/doc/todo/VFALCO_TODO.txt b/doc/todo/VFALCO_TODO.txt
index 32b3160b1..e7455608f 100644
--- a/doc/todo/VFALCO_TODO.txt
+++ b/doc/todo/VFALCO_TODO.txt
@@ -3,6 +3,7 @@ RIPPLE TODO
--------------------------------------------------------------------------------
Vinnie's List: Changes day to day, descending priority
+- Finish up IPEndpoint
- Fix and tidy up broken beast classes
- Parse Validator line using cribbed code
- Parse ContentBodyBuffer from HTTPResponse
diff --git a/src/beast/Builds/VisualStudio2012/beast.vcxproj b/src/beast/Builds/VisualStudio2012/beast.vcxproj
index 2d0b7f019..08e401035 100644
--- a/src/beast/Builds/VisualStudio2012/beast.vcxproj
+++ b/src/beast/Builds/VisualStudio2012/beast.vcxproj
@@ -83,6 +83,13 @@
+
+
+
+
+
+
+
diff --git a/src/beast/Builds/VisualStudio2012/beast.vcxproj.filters b/src/beast/Builds/VisualStudio2012/beast.vcxproj.filters
index e31876252..7cd3c4e58 100644
--- a/src/beast/Builds/VisualStudio2012/beast.vcxproj.filters
+++ b/src/beast/Builds/VisualStudio2012/beast.vcxproj.filters
@@ -195,6 +195,12 @@
{93670bc9-a748-42bd-8118-8de30c468b16}
+
+ {85158eb2-9340-4b3d-a136-f7631c7f1b7c}
+
+
+ {56d34c67-7027-44ba-9f09-4591ce4afb36}
+
@@ -1044,6 +1050,27 @@
beast
+
+ beast
+
+
+ beast\type_traits
+
+
+ beast\type_traits
+
+
+ beast\type_traits
+
+
+ beast\type_traits
+
+
+ beast\utility
+
+
+ beast
+
diff --git a/src/beast/beast/StaticAssert.h b/src/beast/beast/StaticAssert.h
new file mode 100644
index 000000000..1c36d0bd1
--- /dev/null
+++ b/src/beast/beast/StaticAssert.h
@@ -0,0 +1,45 @@
+//------------------------------------------------------------------------------
+/*
+ This file is part of Beast: https://github.com/vinniefalco/Beast
+ Copyright 2013, Vinnie Falco
+
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*/
+//==============================================================================
+
+#ifndef BEAST_STATICASSERT_H_INCLUDED
+#define BEAST_STATICASSERT_H_INCLUDED
+
+#ifndef DOXYGEN
+namespace beast
+{
+ template
+ struct BeastStaticAssert;
+
+ template <>
+ struct BeastStaticAssert
+ {
+ static void dummy() {}
+ };
+}
+#endif
+
+/** A compile-time assertion macro.
+ If the expression parameter is false, the macro will cause a compile error.
+ (The actual error message that the compiler generates may be completely
+ bizarre and seem to have no relation to the place where you put the
+ static_assert though!)
+*/
+#define static_bassert(expression) beast::BeastStaticAssert::dummy();
+
+#endif
diff --git a/src/beast/beast/TypeTraits.h b/src/beast/beast/TypeTraits.h
new file mode 100644
index 000000000..6af5fedc1
--- /dev/null
+++ b/src/beast/beast/TypeTraits.h
@@ -0,0 +1,28 @@
+//------------------------------------------------------------------------------
+/*
+ This file is part of Beast: https://github.com/vinniefalco/Beast
+ Copyright 2013, Vinnie Falco
+
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*/
+//==============================================================================
+
+#ifndef BEAST_TYPETRAITS_H_INCLUDED
+#define BEAST_TYPETRAITS_H_INCLUDED
+
+#include "type_traits/IntegralConstant.h"
+#include "type_traits/IsIntegral.h"
+#include "type_traits/IsSigned.h"
+#include "type_traits/RemoveSigned.h"
+
+#endif
diff --git a/src/beast/beast/net/IPEndpoint.h b/src/beast/beast/net/IPEndpoint.h
index 48ac61266..9a5200418 100644
--- a/src/beast/beast/net/IPEndpoint.h
+++ b/src/beast/beast/net/IPEndpoint.h
@@ -21,6 +21,7 @@
#define BEAST_NET_IPENDPOINT_H_INCLUDED
#include
+#include
#include
#include "../mpl/IfCond.h"
@@ -130,7 +131,8 @@ public:
return
((value&0xff000000)==0x0a000000) || // Prefix /8, 10.##.#.#
((value&0xfff00000)==0xac100000) || // Prefix /12 172.16.#.# - 172.31.#.#
- ((value&0xffff0000)==0xc0a80000) ; // Prefix /16 192.168.#.#
+ ((value&0xffff0000)==0xc0a80000) || // Prefix /16 192.168.#.#
+ isLoopback();
}
/** Returns `true` if this is a broadcast address. */
@@ -602,13 +604,22 @@ inline std::ostream& operator<< (std::ostream &os, IPEndpoint::V6 const& addr)
return os;
}
-inline std::ostream& operator<< (std::ostream &os, IPEndpoint const& endpoint)
+inline std::ostream& operator<< (std::ostream &os, IPEndpoint const& ep)
{
- os << endpoint.to_string();
+ os << ep.to_string();
return os;
}
/** @} */
+/** Input stream conversions. */
+/** @{ */
+inline std::istream& operator>> (std::istream &is, IPEndpoint::V6&)
+{
+ //is >> addr.to_string();
+ return is;
+}
+/** @} */
+
}
#endif
diff --git a/src/beast/beast/net/impl/IPEndpoint.cpp b/src/beast/beast/net/impl/IPEndpoint.cpp
index 3bcbf62ef..555c06b44 100644
--- a/src/beast/beast/net/impl/IPEndpoint.cpp
+++ b/src/beast/beast/net/impl/IPEndpoint.cpp
@@ -22,9 +22,164 @@
namespace beast
{
+namespace parse
+{
+
+/** Require and consume the specified character from the input.
+ @return `true` if the character matched.
+*/
+bool expect (std::istream& is, char v)
+{
+ char c;
+ if (is.get(c) && v == c)
+ return true;
+
+ is.unget();
+ is.setstate (std::ios_base::failbit);
+ return false;
+}
+
+namespace detail
+{
+
+/** Used to disambiguate 8-bit integers from characters. */
+template
+struct integer_holder
+{
+ IntType* pi;
+ explicit integer_holder (IntType& i)
+ : pi (&i)
+ {
+ }
+ template
+ IntType& operator= (OtherIntType o) const
+ {
+ *pi = o;
+ return *pi;
+ }
+};
+
+/** Parse 8-bit unsigned integer. */
+std::istream& operator>> (std::istream& is, integer_holder const& i)
+{
+ uint16 v;
+ is >> v;
+ if (! (v>=0 && v<=255))
+ {
+ is.setstate (std::ios_base::failbit);
+ return is;
+ }
+ i = uint8(v);
+ return is;
+}
+
+}
+
+/** Free function for template argument deduction. */
+template
+detail::integer_holder integer (IntType& i)
+{
+ return detail::integer_holder (i);
+}
+
+}
+
+/** Parse IPv4 address. */
+std::istream& operator>> (std::istream &is, IPEndpoint::V4& addr)
+{
+ uint8 octets [4];
+ is >> parse::integer (octets [0]);
+ for (int i = 1; i < 4; ++i)
+ {
+ if (!is || !parse::expect (is, '.'))
+ return is;
+ is >> parse::integer (octets [i]);
+ if (!is)
+ return is;
+ }
+ addr = IPEndpoint::V4 (octets[0], octets[1], octets[2], octets[3]);
+ return is;
+}
+
+/** Parse an IPEndpoint.
+ @note Currently only IPv4 addresses are supported.
+*/
+inline std::istream& operator>> (std::istream &is, IPEndpoint& ep)
+{
+ IPEndpoint::V4 v4;
+ is >> v4;
+ if (is.fail())
+ return is;
+
+ if (is.rdbuf()->in_avail()>0)
+ {
+ char c;
+ is.get(c);
+ if (c != ':')
+ {
+ is.unget();
+ ep = IPEndpoint (v4);
+ return is;
+ }
+
+ uint16 port;
+ is >> port;
+ if (is.fail())
+ return is;
+
+ ep = IPEndpoint (v4, port);
+ }
+ else
+ {
+ ep = IPEndpoint (v4);
+ }
+
+ return is;
+}
+
+//------------------------------------------------------------------------------
+
class IPEndpointTests : public UnitTest
{
public:
+ bool parse (char const* text, IPEndpoint& ep)
+ {
+ std::string input (text);
+ std::istringstream stream (input);
+ stream >> ep;
+ return !stream.fail();
+ }
+
+ void shouldPass (char const* text)
+ {
+ IPEndpoint ep;
+ expect (parse (text, ep));
+ expect (ep.to_string() == std::string(text));
+ }
+
+ void shouldFail (char const* text)
+ {
+ IPEndpoint ep;
+ unexpected (parse (text, ep));
+ }
+
+ void testParse ()
+ {
+ beginTestCase ("parse");
+
+ shouldPass ("0.0.0.0");
+ shouldPass ("192.168.0.1");
+ shouldPass ("168.127.149.132");
+ shouldPass ("168.127.149.132:80");
+ shouldPass ("168.127.149.132:54321");
+
+ shouldFail ("");
+ shouldFail ("255");
+ shouldFail ("512");
+ shouldFail ("1.2.3.256");
+ shouldFail ("1.2.3:80");
+ }
+
void testPrint ()
{
beginTestCase ("addresses");
@@ -36,7 +191,7 @@ public:
expect ( ep.isPrivate());
expect (!ep.isBroadcast());
expect (!ep.isMulticast());
- expect (!ep.isLoopback());
+ expect ( ep.isLoopback());
expect (ep.to_string() == "127.0.0.1:80");
ep = IPEndpoint::V4(10,0,0,1);
@@ -60,6 +215,7 @@ public:
void runTest ()
{
testPrint();
+ testParse();
}
IPEndpointTests () : UnitTest ("IPEndpoint", "beast")
diff --git a/src/beast/beast/type_traits/IntegralConstant.h b/src/beast/beast/type_traits/IntegralConstant.h
new file mode 100644
index 000000000..1e7162a2e
--- /dev/null
+++ b/src/beast/beast/type_traits/IntegralConstant.h
@@ -0,0 +1,41 @@
+//------------------------------------------------------------------------------
+/*
+ This file is part of Beast: https://github.com/vinniefalco/Beast
+ Copyright 2013, Vinnie Falco
+
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*/
+//==============================================================================
+
+#ifndef BEAST_TYPE_TRAITS_INTEGRALCONSTANT_H_INCLUDED
+#define BEAST_TYPE_TRAITS_INTEGRALCONSTANT_H_INCLUDED
+
+namespace beast
+{
+
+// ideas from boost
+
+template
+struct IntegralConstant
+{
+ typedef IntegralConstant type;
+ typedef T value_type;
+ static const T value = val;
+};
+
+typedef IntegralConstant TrueType;
+typedef IntegralConstant FalseType;
+
+}
+
+#endif
diff --git a/src/beast/beast/type_traits/IsIntegral.h b/src/beast/beast/type_traits/IsIntegral.h
new file mode 100644
index 000000000..ef2391c0a
--- /dev/null
+++ b/src/beast/beast/type_traits/IsIntegral.h
@@ -0,0 +1,44 @@
+//------------------------------------------------------------------------------
+/*
+ This file is part of Beast: https://github.com/vinniefalco/Beast
+ Copyright 2013, Vinnie Falco
+
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*/
+//==============================================================================
+
+#ifndef BEAST_TYPE_TRAITS_ISINTEGRAL_H_INCLUDED
+#define BEAST_TYPE_TRAITS_ISINTEGRAL_H_INCLUDED
+
+#include "IntegralConstant.h"
+
+namespace beast
+{
+
+namespace detail
+
+template struct IsIntegral : FalseType { };
+
+template <> struct IsIntegral : TrueType { };
+template <> struct IsIntegral : TrueType { };
+template <> struct IsIntegral : TrueType { };
+template <> struct IsIntegral : TrueType { };
+template <> struct IsIntegral : TrueType { };
+template <> struct IsIntegral : TrueType { };
+template <> struct IsIntegral : TrueType { };
+template <> struct IsIntegral : TrueType { };
+template <> struct IsIntegral : TrueType { };
+
+}
+
+#endif
diff --git a/src/beast/beast/type_traits/IsSigned.h b/src/beast/beast/type_traits/IsSigned.h
new file mode 100644
index 000000000..cc3c499a2
--- /dev/null
+++ b/src/beast/beast/type_traits/IsSigned.h
@@ -0,0 +1,40 @@
+//------------------------------------------------------------------------------
+/*
+ This file is part of Beast: https://github.com/vinniefalco/Beast
+ Copyright 2013, Vinnie Falco
+
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*/
+//==============================================================================
+
+#ifndef BEAST_TYPE_TRAITS_ISSIGNED_H_INCLUDED
+#define BEAST_TYPE_TRAITS_ISSIGNED_H_INCLUDED
+
+#include "IntegralConstant.h"
+
+namespace beast
+{
+
+template struct IsSigned : FalseType { };
+
+template <> struct IsSigned : TrueType { };
+template <> struct IsSigned : TrueType { };
+template <> struct IsSigned : TrueType { };
+template <> struct IsSigned : TrueType { };
+template <> struct IsSigned : TrueType { };
+template <> struct IsSigned : TrueType { };
+template <> struct IsSigned : TrueType { };
+
+}
+
+#endif
diff --git a/src/beast/beast/type_traits/RemoveSigned.h b/src/beast/beast/type_traits/RemoveSigned.h
new file mode 100644
index 000000000..a226aced8
--- /dev/null
+++ b/src/beast/beast/type_traits/RemoveSigned.h
@@ -0,0 +1,45 @@
+//------------------------------------------------------------------------------
+/*
+ This file is part of Beast: https://github.com/vinniefalco/Beast
+ Copyright 2013, Vinnie Falco
+
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*/
+//==============================================================================
+
+#ifndef BEAST_TYPE_TRAITS_REMOVESIGNED_H_INCLUDED
+#define BEAST_TYPE_TRAITS_REMOVESIGNED_H_INCLUDED
+
+#include "IntegralConstant.h"
+
+namespace beast
+{
+
+/** Returns an equally sized, unsigned type.
+ Requires:
+ IsIntegral::value == true
+*/
+template
+struct RemoveSigned
+{
+ typedef T type;
+}
+
+template <> struct RemoveSigned { typedef uint8 type; }
+template <> struct RemoveSigned { typedef uint16 type; }
+template <> struct RemoveSigned { typedef uint32 type; }
+template <> struct RemoveSigned { typedef uint64 type; }
+
+}
+
+#endif
diff --git a/src/beast/beast/utility/EnableIf.h b/src/beast/beast/utility/EnableIf.h
new file mode 100644
index 000000000..eca9106d1
--- /dev/null
+++ b/src/beast/beast/utility/EnableIf.h
@@ -0,0 +1,48 @@
+//------------------------------------------------------------------------------
+/*
+ This file is part of Beast: https://github.com/vinniefalco/Beast
+ Copyright 2013, Vinnie Falco
+
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*/
+//==============================================================================
+
+#ifndef BEAST_UTILITY_ENABLEIF_H_INCLUDED
+#define BEAST_UTILITY_ENABLEIF_H_INCLUDED
+
+#include "../type_traits/IntegralConstant.h"
+
+namespace beast
+{
+
+template
+struct EnableIfBool : FalseType { typedef T type; };
+
+template
+struct EnableIfBool { };
+
+template
+struct EnableIf : public EnableIfBool { };
+
+template
+struct DisableIfBool : FalseType { typedef T type; };
+
+template
+struct DisableIfBool { };
+
+template
+struct DisableIf : public DisableIfBool { };
+
+}
+
+#endif
diff --git a/src/beast/modules/beast_core/beast_core.h b/src/beast/modules/beast_core/beast_core.h
index 6f35a57c9..2e63e5f9d 100644
--- a/src/beast/modules/beast_core/beast_core.h
+++ b/src/beast/modules/beast_core/beast_core.h
@@ -24,154 +24,6 @@
#ifndef BEAST_CORE_H_INCLUDED
#define BEAST_CORE_H_INCLUDED
-//------------------------------------------------------------------------------
-/**
-
-@mainpage Beast: A C++ library for peer to peer and client server development.
-
-### Version 1.0
-
-Copyright 2008, 2013 by Vinnie Falco \ ([e-mail][0])
-
-Beast is a source code collection of individual modules containing
-functionality for a variety of applications, with an emphasis on building
-concurrent systems. Beast incorporates parts of [JUCE][3] (Jules' Utility
-Class Extensions), available from [Raw Material Software][4]. Beast has no
-external dependencies
-
-Beast is hosted on Github at [https://github.com/vinniefalco/Beast][1]
-
-The online documentation is at [http://vinniefalco.github.com/Beast][2]
-
-## Platforms
-
-All platforms supported by JUCE are also supported by Beast. Currently these
-platforms include:
-
-- **Windows**: Applications and VST/RTAS/NPAPI/ActiveX plugins can be built
-using MS Visual Studio. The results are all fully compatible with Windows
-XP, Vista or Windows 7.
-
-- **Mac OS X**: Applications and VST/AudioUnit/RTAS/NPAPI plugins with Xcode.
-
-- **GNU/Linux**: Applications and plugins can be built for any kernel 2.6 or
-later.
-
-- **FreeBSD**: Kernel version 8.4 or higher required.
-
-- **iOS**: Native iPhone and iPad apps.
-
-- **Android**: Supported.
-
-## Prerequisites
-
-This documentation assumes that the reader has a working knowledge of JUCE.
-Some modules built on external libraries assume that the reader understands
-the operation of those external libraries. Certain modules assume that the
-reader understands additional domain-specific information. Modules with
-additional prerequisites are marked in the documentation.
-
-## External Modules
-
-Some modules bring in functionality provided by external libraries. For
-example, the @ref beast_bzip2 module provides the compression and decompression
-algorithms in [bZip2][7]. Usage of these external library modules is optional.
-They come with complete source code, as well as options for using either
-system or user provided variants of the external libraries: it is not
-necessary to download additional source code packages to use these modules.
-
-External code incorporated into Beast is covered by separate licenses. See
-the licensing information and notes in the corresponding source files for
-copyright information and terms of use.
-
-## Integration
-
-Beast requires recent versions of JUCE. It won't work with versions 1.53 or
-earlier. To use the library it is necessary to first download JUCE to a
-location where your development environment can find it. Or, you can use your
-existing installation of JUCE.
-
-This library uses the same modularized organizational structure as JUCE. To
-use a module, first add a path to the list of includes searched by your
-development environment or project, which points to the Beast directory. Then,
-add the single corresponding .c or .cpp file to your existing project which
-already uses JUCE. For example, to use the @ref beast_core module, add the file
-beast_core.cpp to your project. Some modules depend on other modules.
-
-To use a module, include the appropriate header from within your source code.
-For example, to access classes in the @ref beast_concurrent module, use this:
-
-@code
-
-#include "modules/beast_concurrent/beast_concurrent.h"
-
-@endcode
-
-Then add the corresponding file beast_concurrent.cpp to your build.
-
-## AppConfig
-
-Some Beast features can be controlled at compilation time through
-preprocessor directives. The available choices of compilation options are
-described in AppConfig.h, located in the AppConfigTemplate directory. Copy
-the provided settings into your existing AppConfig.h (a file used by JUCE
-convention).
-
-## License
-
-This library contains portions of other open source products covered by
-separate licenses. Please see the corresponding source files for specific
-terms.
-
-Beast is provided under the terms of The ISC License:
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-Some files contain portions of these external projects, licensed separately:
-
-- [bZip2][7] is Copyright (C) 1996-2010 Julian R Seward. All rights
- reserved. See the corresponding file LICENSE for licensing terms.
-
-- [Soci][13] is Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton, and
- various others noted in the corresponding source files. Soci is distributed
- under the [Boost Software License, Version 1.0][14].
-
-- [SQLite][15], placed in the public domain.
-
-[0]: mailto:vinnie.falco@gmail.com "Vinnie Falco (Email)"
-[1]: https://github.com/vinniefalco/Beast "Beast Project"
-[2]: http://vinniefalco.github.com/Beast/ "Beast Documentation"
-[3]: http://rawmaterialsoftware.com/juce.php "JUCE"
-[4]: http://rawmaterialsoftware.com/ "Raw Material Software"
-[5]: http://www.gnu.org/licenses/gpl-2.0.html "GNU General Public License, version 2"
-[6]: http://rawmaterialsoftware.com/jucelicense.php "JUCE Licenses"
-[7]: http://www.bzip.org/ "bZip2: Home"
-[8]: http://freetype.org/ "The FreeType Project"
-[9]: http://www.freetype.org/FTL.TXT "The FreeType Project License"
-[10]: http://www.lua.org/ "The Programming Language Lua"
-[11]: http://opensource.org/licenses/ISC "The ISC License"
-[12]: https://github.com/vinniefalco/LuaBridge
-[13]: http://soci.sourceforge.net/ "SOCI"
-[14]: http://www.boost.org/LICENSE_1_0.txt "Boost Software License, Version 1.0"
-[15]: http://sqlite.org/ "SQLite Home Page"
-[16]: http://developer.kde.org/~wheeler/taglib.html "TagLib"
-[17]: http://www.gnu.org/licenses/lgpl-2.1.html "Gnu Lesser General Public License, version 2.1"
-[18]: http://www.mozilla.org/MPL/1.1/ "Mozilla Public License"
-
-@copyright Copyright 2008-2013 by Vinnie Falco \ ([e-mail][0])
-@copyright Provided under the [ISC LIcense][11]
-*/
-
// TargetPlatform.h should not use anything from BeastConfig.h
#include "../../beast/Config.h"
#include "system/BeastConfigCheck.h"
@@ -225,6 +77,7 @@ Some files contain portions of these external projects, licensed separately:
//------------------------------------------------------------------------------
#include "../../beast/CStdInt.h"
+#include "../../beast/StaticAssert.h"
namespace beast
{
diff --git a/src/beast/modules/beast_core/system/PlatformDefs.h b/src/beast/modules/beast_core/system/PlatformDefs.h
index 63774dce9..5039445a5 100644
--- a/src/beast/modules/beast_core/system/PlatformDefs.h
+++ b/src/beast/modules/beast_core/system/PlatformDefs.h
@@ -128,21 +128,6 @@
//------------------------------------------------------------------------------
-#ifndef DOXYGEN
-namespace beast
-{
-template struct BeastStaticAssert;
-template <> struct BeastStaticAssert { static void dummy() {} };
-}
-#endif
-
-/** A compile-time assertion macro.
- If the expression parameter is false, the macro will cause a compile error. (The actual error
- message that the compiler generates may be completely bizarre and seem to have no relation to
- the place where you put the static_assert though!)
-*/
-#define static_bassert(expression) beast::BeastStaticAssert::dummy();
-
/** This macro can be added to class definitions to disable the use of new/delete to
allocate the object on the heap, forcing it to only be used as a stack or member variable.
*/