Browse Source

Fixed compatibility with GCC 4.8

tags/2021-05-28
Tom Poole 6 years ago
parent
commit
d06a2b8c13
6 changed files with 85 additions and 44 deletions
  1. +29
    -29
      README.md
  2. +4
    -2
      extras/Projucer/Source/ProjectSaving/jucer_XcodeProjectParser.h
  3. +7
    -5
      modules/juce_core/containers/juce_ArrayBase.cpp
  4. +9
    -2
      modules/juce_core/containers/juce_ArrayBase.h
  5. +1
    -4
      modules/juce_core/time/juce_Time.cpp
  6. +35
    -2
      modules/juce_gui_basics/components/juce_Component.cpp

+ 29
- 29
README.md View File

@@ -1,38 +1,38 @@
![alt text](https://d30pueezughrda.cloudfront.net/juce/JUCE_banner.png "JUCE")

JUCE is an open-source cross-platform C++ application framework used for rapidly
developing high quality desktop and mobile applications, including VST, AU (and AUv3),
RTAS and AAX audio plug-ins. JUCE can be easily integrated with existing projects or can
be used as a project generation tool via the [Projucer](https://juce.com/discover/projucer),
which supports exporting projects for Xcode (macOS and iOS), Visual Studio, Android Studio,
Code::Blocks, CLion and Linux Makefiles as well as containing a source code editor and
live-coding engine which can be used for rapid prototyping.
JUCE is an open-source cross-platform C++ application framework used for rapidly
developing high quality desktop and mobile applications, including VST, AU (and AUv3),
RTAS and AAX audio plug-ins. JUCE can be easily integrated with existing projects or can
be used as a project generation tool via the [Projucer](https://juce.com/discover/projucer),
which supports exporting projects for Xcode (macOS and iOS), Visual Studio, Android Studio,
Code::Blocks, CLion and Linux Makefiles as well as containing a source code editor and
live-coding engine which can be used for rapid prototyping.

## Getting Started
The JUCE repository contains a [master](https://github.com/weareroli/JUCE/tree/master)
and [develop](https://github.com/weareroli/JUCE/tree/develop) branch. The develop branch
contains the latest bugfixes and features and is periodically merged into the master
branch in stable [tagged releases](https://github.com/WeAreROLI/JUCE/releases)
(the latest release containing pre-built binaries can be also downloaded from the
The JUCE repository contains a [master](https://github.com/weareroli/JUCE/tree/master)
and [develop](https://github.com/weareroli/JUCE/tree/develop) branch. The develop branch
contains the latest bugfixes and features and is periodically merged into the master
branch in stable [tagged releases](https://github.com/WeAreROLI/JUCE/releases)
(the latest release containing pre-built binaries can be also downloaded from the
[JUCE website](https://shop.juce.com/get-juce)).

The repository doesn't contain a pre-built Projucer so you will need to build it
for your platform - Xcode, Visual Studio and Linux Makefile projects are located in
[extras/Projucer/Builds](/extras/Projucer/Builds)
(the minumum system requirements are listed in the __System Requirements__ section below).
The Projucer can then be used to create new JUCE projects, view tutorials and run examples.
It is also possible to include the JUCE modules source code in an existing project directly,
for your platform - Xcode, Visual Studio and Linux Makefile projects are located in
[extras/Projucer/Builds](/extras/Projucer/Builds)
(the minumum system requirements are listed in the __System Requirements__ section below).
The Projucer can then be used to create new JUCE projects, view tutorials and run examples.
It is also possible to include the JUCE modules source code in an existing project directly,
or build them into a static or dynamic library which can be linked into a project.

For further help getting started, please refer to the JUCE
[documentation](https://juce.com/learn/documentation) and
For further help getting started, please refer to the JUCE
[documentation](https://juce.com/learn/documentation) and
[tutorials](https://juce.com/learn/tutorials).

## System Requirements
#### Building JUCE Projects
- __macOS__: macOS 10.11 and Xcode 7.3.1
- __Windows__: Windows 8.1 and Visual Studio 2013 64-bit
- __Linux__: GCC 5.0
- __Linux__: GCC 4.8

#### Minimum Deployment Targets
- __macOS__: macOS 10.7
@@ -40,18 +40,18 @@ For further help getting started, please refer to the JUCE
- __Linux__: Mainstream Linux distributions

## Contributing
For bug reports and features requests, please visit the [JUCE Forum](https://forum.juce.com/) -
For bug reports and features requests, please visit the [JUCE Forum](https://forum.juce.com/) -
the JUCE developers are active there and will read every post and respond accordingly. When
submitting a bug report, please ensure that it follows the
[issue template](/.github/ISSUE_TEMPLATE.txt).
We don't accept third party GitHub pull requests directly due to copyright restrictions
submitting a bug report, please ensure that it follows the
[issue template](/.github/ISSUE_TEMPLATE.txt).
We don't accept third party GitHub pull requests directly due to copyright restrictions
but if you would like to contribute any changes please contact us.

## License
The core JUCE modules (juce_audio_basics, juce_audio_devices, juce_blocks_basics, juce_core
and juce_events) are permissively licensed under the terms of the
[ISC license](http://www.isc.org/downloads/software-support-policy/isc-license/).
Other modules are covered by a
The core JUCE modules (juce_audio_basics, juce_audio_devices, juce_blocks_basics, juce_core
and juce_events) are permissively licensed under the terms of the
[ISC license](http://www.isc.org/downloads/software-support-policy/isc-license/).
Other modules are covered by a
[GPL/Commercial license](https://www.gnu.org/licenses/gpl-3.0.en.html).

There are multiple commercial licensing tiers for JUCE 5, with different terms for each:
@@ -60,4 +60,4 @@ There are multiple commercial licensing tiers for JUCE 5, with different terms f
- JUCE Pro (no revenue limit) - $65/month
- JUCE Eductational (no revenue limit) - free for bona fide educational institutes

For full terms see [LICENSE.md](LICENSE.md).
For full terms see [LICENSE.md](LICENSE.md).

+ 4
- 2
extras/Projucer/Source/ProjectSaving/jucer_XcodeProjectParser.h View File

@@ -46,10 +46,12 @@ public:
auto content = pbxprojs[0].loadFileAsString().toStdString();
std::regex comments ("/\\*.*?\\*/");
content = (std::regex_replace (content, comments, ""));
std::string empty ("");
content = (std::regex_replace (content, comments, empty));
std::regex whitespace ("\\s+");
content = (std::regex_replace (content, whitespace, " "));
std::string space (" ");
content = (std::regex_replace (content, whitespace, space));
auto objects = std::make_unique<HashMap<std::string, std::string>>();
std::smatch objectsStartMatch;


+ 7
- 5
modules/juce_core/containers/juce_ArrayBase.cpp View File

@@ -104,6 +104,13 @@ class ArrayBaseTests : public UnitTest
using CopyableType = ArrayBaseTestsHelpers::TriviallyCopyableType;
using NoncopyableType = ArrayBaseTestsHelpers::NonTriviallyCopyableType;
#if ! (defined(__GNUC__) && __GNUC__ < 5 && ! defined(__clang__))
static_assert (std::is_trivially_copyable<CopyableType>::value,
"Test TriviallyCopyableType is not trivially copyable");
static_assert (! std::is_trivially_copyable<NoncopyableType>::value,
"Test NonTriviallyCopyableType is trivially copyable");
#endif
public:
ArrayBaseTests()
: UnitTest ("ArrayBase", "Containers")
@@ -111,11 +118,6 @@ public:
void runTest() override
{
static_assert (std::is_trivially_copyable<CopyableType>::value,
"Test TriviallyCopyableType is not trivially copyable");
static_assert (! std::is_trivially_copyable<NoncopyableType>::value,
"Test NonTriviallyCopyableType is trivially copyable");
beginTest ("grow capacity");
{
std::vector<CopyableType> referenceContainer;


+ 9
- 2
modules/juce_core/containers/juce_ArrayBase.h View File

@@ -372,10 +372,17 @@ public:
private:
//==============================================================================
template <typename T>
using TriviallyCopyableVoid = typename std::enable_if<std::is_trivially_copyable<T>::value, void>::type;
#if defined(__GNUC__) && __GNUC__ < 5 && ! defined(__clang__)
using IsTriviallyCopyable = std::is_scalar<T>;
#else
using IsTriviallyCopyable = std::is_trivially_copyable<T>;
#endif
template <typename T>
using NonTriviallyCopyableVoid = typename std::enable_if<! std::is_trivially_copyable<T>::value, void>::type;
using TriviallyCopyableVoid = typename std::enable_if<IsTriviallyCopyable<T>::value, void>::type;
template <typename T>
using NonTriviallyCopyableVoid = typename std::enable_if<! IsTriviallyCopyable<T>::value, void>::type;
//==============================================================================
template <typename T = ElementType>


+ 1
- 4
modules/juce_core/time/juce_Time.cpp View File

@@ -181,10 +181,7 @@ namespace TimeHelpers
}
//==============================================================================
Time::Time (int64 ms) noexcept : millisSinceEpoch (ms)
{
static_assert (std::is_trivially_copyable<Time>::value, "Time is not trivially copyable");
}
Time::Time (int64 ms) noexcept : millisSinceEpoch (ms) {}
Time::Time (int year, int month, int day,
int hours, int minutes, int seconds, int milliseconds,


+ 35
- 2
modules/juce_gui_basics/components/juce_Component.cpp View File

@@ -65,9 +65,42 @@ public:
}
}
template <typename ...Params>
// g++ 4.8 cannot deduce the parameter pack inside the function pointer when it has more than one element
#if defined(__GNUC__) && __GNUC__ < 5 && ! defined(__clang__)
template <typename... Params>
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
void (MouseListener::*eventMethod) (Params...), Params... params)
void (MouseListener::*eventMethod) (const MouseEvent&),
Params... params)
{
sendMouseEvent <decltype (eventMethod), Params...> (comp, checker, eventMethod, params...);
}
template <typename... Params>
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
void (MouseListener::*eventMethod) (const MouseEvent&, const MouseWheelDetails&),
Params... params)
{
sendMouseEvent <decltype (eventMethod), Params...> (comp, checker, eventMethod, params...);
}
template <typename... Params>
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
void (MouseListener::*eventMethod) (const MouseEvent&, float),
Params... params)
{
sendMouseEvent <decltype (eventMethod), Params...> (comp, checker, eventMethod, params...);
}
template <typename EventMethod, typename... Params>
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
EventMethod eventMethod,
Params... params)
#else
template <typename... Params>
static void sendMouseEvent (Component& comp, Component::BailOutChecker& checker,
void (MouseListener::*eventMethod) (Params...),
Params... params)
#endif
{
if (checker.shouldBailOut())
return;


Loading…
Cancel
Save