Namespace Conflict with JUCE

When attemping to build libtorch into an audio plugin with JUCE (GitHub - juce-framework/JUCE at develop) there is a conflict between nullopt in the two libraries. I see this has been posted on multiple forums but have yet to find a definitive solution. Here is my specific issue:

In file included from /usr/local/include/torch/script.h:3:
In file included from /usr/local/include/torch/csrc/api/include/torch/types.h:3:
In file included from /usr/local/include/ATen/ATen.h:9:
/usr/local/include/ATen/DeviceGuard.h:27:49: error: reference to 'nullopt' is ambiguous
  return t.has_value() ? device_of(t.value()) : nullopt;
                                                ^
/usr/local/include/c10/util/Optional.h:163:21: note: candidate found by name lookup is 'c10::nullopt'
constexpr nullopt_t nullopt{0};
                    ^
plugin/JUCE/modules/juce_core/containers/juce_Optional.h:27:16: note: candidate found by name lookup is 'juce::nullopt'
constexpr auto nullopt = std::nullopt;

Is there a version of libtorch with this fixed, or something I can do other than manually changing torch files?

You could add the missing c10 namespace into this line of code to fix the issue.
Would you also be interested in submitting the fix directly to PyTorch?