Browse Source

Use new-style debug operators everywhere.

pull/110/head
Vladimír Vondruš 11 years ago
parent
commit
0aa16595eb
  1. 8
      src/Magnum/Array.h
  2. 26
      src/Magnum/Attribute.cpp
  3. 30
      src/Magnum/Attribute.h
  4. 2
      src/Magnum/Audio/Buffer.cpp
  5. 2
      src/Magnum/Audio/Buffer.h
  6. 4
      src/Magnum/Audio/Renderer.cpp
  7. 4
      src/Magnum/Audio/Renderer.h
  8. 2
      src/Magnum/Audio/Source.cpp
  9. 2
      src/Magnum/Audio/Source.h
  10. 4
      src/Magnum/Buffer.cpp
  11. 4
      src/Magnum/Buffer.h
  12. 2
      src/Magnum/Context.cpp
  13. 2
      src/Magnum/Context.h
  14. 12
      src/Magnum/DebugOutput.cpp
  15. 12
      src/Magnum/DebugOutput.h
  16. 2
      src/Magnum/DefaultFramebuffer.cpp
  17. 2
      src/Magnum/DefaultFramebuffer.h
  18. 2
      src/Magnum/Framebuffer.cpp
  19. 2
      src/Magnum/Framebuffer.h
  20. 12
      src/Magnum/Math/Angle.h
  21. 2
      src/Magnum/Math/BoolVector.h
  22. 4
      src/Magnum/Math/Color.h
  23. 6
      src/Magnum/Math/Complex.h
  24. 2
      src/Magnum/Math/Dual.h
  25. 6
      src/Magnum/Math/DualComplex.h
  26. 6
      src/Magnum/Math/DualQuaternion.h
  27. 2
      src/Magnum/Math/Matrix.h
  28. 2
      src/Magnum/Math/Matrix3.h
  29. 2
      src/Magnum/Math/Matrix4.h
  30. 6
      src/Magnum/Math/Quaternion.h
  31. 2
      src/Magnum/Math/Range.h
  32. 38
      src/Magnum/Math/RectangularMatrix.h
  33. 2
      src/Magnum/Math/Test/UnitTest.cpp
  34. 26
      src/Magnum/Math/Vector.h
  35. 2
      src/Magnum/Math/Vector2.h
  36. 2
      src/Magnum/Math/Vector3.h
  37. 2
      src/Magnum/Math/Vector4.h
  38. 88
      src/Magnum/Math/instantiation.cpp
  39. 4
      src/Magnum/Mesh.cpp
  40. 4
      src/Magnum/Mesh.h
  41. 6
      src/Magnum/PixelFormat.cpp
  42. 6
      src/Magnum/PixelFormat.h
  43. 6
      src/Magnum/Renderer.cpp
  44. 6
      src/Magnum/Renderer.h
  45. 2
      src/Magnum/Resource.cpp
  46. 4
      src/Magnum/Resource.h
  47. 12
      src/Magnum/Sampler.cpp
  48. 12
      src/Magnum/Sampler.h
  49. 2
      src/Magnum/SceneGraph/Animable.cpp
  50. 2
      src/Magnum/SceneGraph/Animable.h
  51. 2
      src/Magnum/Shader.cpp
  52. 2
      src/Magnum/Shader.h
  53. 2
      src/Magnum/Shapes/Composition.h
  54. 4
      src/Magnum/Shapes/shapeImplementation.cpp
  55. 4
      src/Magnum/Shapes/shapeImplementation.h
  56. 2
      src/Magnum/Trade/AbstractMaterialData.cpp
  57. 2
      src/Magnum/Trade/AbstractMaterialData.h
  58. 2
      src/Magnum/Trade/ObjectData2D.cpp
  59. 2
      src/Magnum/Trade/ObjectData2D.h
  60. 2
      src/Magnum/Trade/ObjectData3D.cpp
  61. 2
      src/Magnum/Trade/ObjectData3D.h
  62. 2
      src/Magnum/Trade/TextureData.cpp
  63. 2
      src/Magnum/Trade/TextureData.h
  64. 2
      src/Magnum/Version.cpp
  65. 2
      src/Magnum/Version.h

8
src/Magnum/Array.h

@ -204,7 +204,7 @@ template<class T> class Array3D: public Array<3, T> {
}; };
/** @debugoperator{Magnum::Array} */ /** @debugoperator{Magnum::Array} */
template<UnsignedInt dimensions, class T> Debug operator<<(Debug debug, const Array<dimensions, T>& value) { template<UnsignedInt dimensions, class T> Debug& operator<<(Debug& debug, const Array<dimensions, T>& value) {
debug << "Array("; debug << "Array(";
debug.setFlag(Debug::SpaceAfterEachValue, false); debug.setFlag(Debug::SpaceAfterEachValue, false);
for(UnsignedInt i = 0; i != dimensions; ++i) { for(UnsignedInt i = 0; i != dimensions; ++i) {
@ -217,17 +217,17 @@ template<UnsignedInt dimensions, class T> Debug operator<<(Debug debug, const Ar
} }
/** @debugoperator{Magnum::Array1D} */ /** @debugoperator{Magnum::Array1D} */
template<class T> inline Debug operator<<(Debug debug, const Array1D<T>& value) { template<class T> inline Debug& operator<<(Debug& debug, const Array1D<T>& value) {
return debug << static_cast<const Array<1, T>&>(value); return debug << static_cast<const Array<1, T>&>(value);
} }
/** @debugoperator{Magnum::Array2D} */ /** @debugoperator{Magnum::Array2D} */
template<class T> inline Debug operator<<(Debug debug, const Array2D<T>& value) { template<class T> inline Debug& operator<<(Debug& debug, const Array2D<T>& value) {
return debug << static_cast<const Array<2, T>&>(value); return debug << static_cast<const Array<2, T>&>(value);
} }
/** @debugoperator{Magnum::Array3D} */ /** @debugoperator{Magnum::Array3D} */
template<class T> inline Debug operator<<(Debug debug, const Array3D<T>& value) { template<class T> inline Debug& operator<<(Debug& debug, const Array3D<T>& value) {
return debug << static_cast<const Array<3, T>&>(value); return debug << static_cast<const Array<3, T>&>(value);
} }

26
src/Magnum/Attribute.cpp

@ -139,7 +139,7 @@ UnsignedInt Attribute<Math::Vector<4, Float>>::size(GLint components, DataType d
CORRADE_ASSERT_UNREACHABLE(); CORRADE_ASSERT_UNREACHABLE();
} }
Debug operator<<(Debug debug, SizedAttribute<1, 1>::Components value) { Debug& operator<<(Debug& debug, SizedAttribute<1, 1>::Components value) {
switch(value) { switch(value) {
case SizedAttribute<1, 1>::Components::One: case SizedAttribute<1, 1>::Components::One:
return debug << "Attribute::Components::One"; return debug << "Attribute::Components::One";
@ -148,7 +148,7 @@ Debug operator<<(Debug debug, SizedAttribute<1, 1>::Components value) {
return debug << "Attribute::Components::(invalid)"; return debug << "Attribute::Components::(invalid)";
} }
Debug operator<<(Debug debug, SizedAttribute<1, 2>::Components value) { Debug& operator<<(Debug& debug, SizedAttribute<1, 2>::Components value) {
switch(value) { switch(value) {
case SizedAttribute<1, 2>::Components::One: case SizedAttribute<1, 2>::Components::One:
return debug << "Attribute::Components::One"; return debug << "Attribute::Components::One";
@ -159,7 +159,7 @@ Debug operator<<(Debug debug, SizedAttribute<1, 2>::Components value) {
return debug << "Attribute::Components::(invalid)"; return debug << "Attribute::Components::(invalid)";
} }
Debug operator<<(Debug debug, SizedAttribute<1, 3>::Components value) { Debug& operator<<(Debug& debug, SizedAttribute<1, 3>::Components value) {
switch(value) { switch(value) {
case SizedAttribute<1, 3>::Components::One: case SizedAttribute<1, 3>::Components::One:
return debug << "Attribute::Components::One"; return debug << "Attribute::Components::One";
@ -172,7 +172,7 @@ Debug operator<<(Debug debug, SizedAttribute<1, 3>::Components value) {
return debug << "Attribute::Components::(invalid)"; return debug << "Attribute::Components::(invalid)";
} }
Debug operator<<(Debug debug, SizedAttribute<1, 4>::Components value) { Debug& operator<<(Debug& debug, SizedAttribute<1, 4>::Components value) {
switch(value) { switch(value) {
case SizedAttribute<1, 4>::Components::One: case SizedAttribute<1, 4>::Components::One:
return debug << "Attribute::Components::One"; return debug << "Attribute::Components::One";
@ -187,7 +187,7 @@ Debug operator<<(Debug debug, SizedAttribute<1, 4>::Components value) {
return debug << "Attribute::Components::(invalid)"; return debug << "Attribute::Components::(invalid)";
} }
Debug operator<<(Debug debug, SizedMatrixAttribute<2>::Components value) { Debug& operator<<(Debug& debug, SizedMatrixAttribute<2>::Components value) {
switch(value) { switch(value) {
case SizedMatrixAttribute<2>::Components::Two: case SizedMatrixAttribute<2>::Components::Two:
return debug << "Attribute::Components::Two"; return debug << "Attribute::Components::Two";
@ -196,7 +196,7 @@ Debug operator<<(Debug debug, SizedMatrixAttribute<2>::Components value) {
return debug << "Attribute::Components::(invalid)"; return debug << "Attribute::Components::(invalid)";
} }
Debug operator<<(Debug debug, SizedMatrixAttribute<3>::Components value) { Debug& operator<<(Debug& debug, SizedMatrixAttribute<3>::Components value) {
switch(value) { switch(value) {
case SizedMatrixAttribute<3>::Components::Three: case SizedMatrixAttribute<3>::Components::Three:
return debug << "Attribute::Components::Three"; return debug << "Attribute::Components::Three";
@ -205,7 +205,7 @@ Debug operator<<(Debug debug, SizedMatrixAttribute<3>::Components value) {
return debug << "Attribute::Components::(invalid)"; return debug << "Attribute::Components::(invalid)";
} }
Debug operator<<(Debug debug, SizedMatrixAttribute<4>::Components value) { Debug& operator<<(Debug& debug, SizedMatrixAttribute<4>::Components value) {
switch(value) { switch(value) {
case SizedMatrixAttribute<4>::Components::Four: case SizedMatrixAttribute<4>::Components::Four:
return debug << "Attribute::Components::Four"; return debug << "Attribute::Components::Four";
@ -214,7 +214,7 @@ Debug operator<<(Debug debug, SizedMatrixAttribute<4>::Components value) {
return debug << "Attribute::Components::(invalid)"; return debug << "Attribute::Components::(invalid)";
} }
Debug operator<<(Debug debug, Attribute<Math::Vector<4, Float>>::Components value) { Debug& operator<<(Debug& debug, Attribute<Math::Vector<4, Float>>::Components value) {
switch(value) { switch(value) {
case Attribute<Math::Vector<4, Float>>::Components::One: case Attribute<Math::Vector<4, Float>>::Components::One:
return debug << "Attribute::Components::One"; return debug << "Attribute::Components::One";
@ -233,7 +233,7 @@ Debug operator<<(Debug debug, Attribute<Math::Vector<4, Float>>::Components valu
return debug << "Attribute::Components::(invalid)"; return debug << "Attribute::Components::(invalid)";
} }
Debug operator<<(Debug debug, FloatAttribute::DataType value) { Debug& operator<<(Debug& debug, FloatAttribute::DataType value) {
switch(value) { switch(value) {
#define _c(value) case FloatAttribute::DataType::value: return debug << "Attribute::DataType::" #value; #define _c(value) case FloatAttribute::DataType::value: return debug << "Attribute::DataType::" #value;
_c(UnsignedByte) _c(UnsignedByte)
@ -254,7 +254,7 @@ Debug operator<<(Debug debug, FloatAttribute::DataType value) {
} }
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
Debug operator<<(Debug debug, IntAttribute::DataType value) { Debug& operator<<(Debug& debug, IntAttribute::DataType value) {
switch(value) { switch(value) {
#define _c(value) case IntAttribute::DataType::value: return debug << "Attribute::DataType::" #value; #define _c(value) case IntAttribute::DataType::value: return debug << "Attribute::DataType::" #value;
_c(UnsignedByte) _c(UnsignedByte)
@ -271,7 +271,7 @@ Debug operator<<(Debug debug, IntAttribute::DataType value) {
#endif #endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
Debug operator<<(Debug debug, DoubleAttribute::DataType value) { Debug& operator<<(Debug& debug, DoubleAttribute::DataType value) {
switch(value) { switch(value) {
#define _c(value) case DoubleAttribute::DataType::value: return debug << "Attribute::DataType::" #value; #define _c(value) case DoubleAttribute::DataType::value: return debug << "Attribute::DataType::" #value;
_c(Double) _c(Double)
@ -282,7 +282,7 @@ Debug operator<<(Debug debug, DoubleAttribute::DataType value) {
} }
#endif #endif
Debug operator<<(Debug debug, Attribute<Math::Vector<3, Float>>::DataType value) { Debug& operator<<(Debug& debug, Attribute<Math::Vector<3, Float>>::DataType value) {
switch(value) { switch(value) {
#define _c(value) case Attribute<Math::Vector<3, Float>>::DataType::value: return debug << "Attribute::DataType::" #value; #define _c(value) case Attribute<Math::Vector<3, Float>>::DataType::value: return debug << "Attribute::DataType::" #value;
_c(UnsignedByte) _c(UnsignedByte)
@ -303,7 +303,7 @@ Debug operator<<(Debug debug, Attribute<Math::Vector<3, Float>>::DataType value)
return debug << "Attribute::DataType::(invalid)"; return debug << "Attribute::DataType::(invalid)";
} }
Debug operator<<(Debug debug, Attribute<Math::Vector<4, Float>>::DataType value) { Debug& operator<<(Debug& debug, Attribute<Math::Vector<4, Float>>::DataType value) {
switch(value) { switch(value) {
#define _c(value) case Attribute<Math::Vector<4, Float>>::DataType::value: return debug << "Attribute::DataType::" #value; #define _c(value) case Attribute<Math::Vector<4, Float>>::DataType::value: return debug << "Attribute::DataType::" #value;
_c(UnsignedByte) _c(UnsignedByte)

30
src/Magnum/Attribute.h

@ -297,10 +297,10 @@ template<UnsignedInt location, class T> class Attribute {
#ifdef DOXYGEN_GENERATING_OUTPUT #ifdef DOXYGEN_GENERATING_OUTPUT
/** @debugoperatorclassenum{Magnum::Attribute,Magnum::Attribute::Components} */ /** @debugoperatorclassenum{Magnum::Attribute,Magnum::Attribute::Components} */
template<class T> Debug operator<<(Debug debug, Attribute<T>::Components); template<class T> Debug& operator<<(Debug& debug, Attribute<T>::Components);
/** @debugoperatorclassenum{Magnum::Attribute,Magnum::Attribute::DataType} */ /** @debugoperatorclassenum{Magnum::Attribute,Magnum::Attribute::DataType} */
template<class T> Debug operator<<(Debug debug, Attribute<T>::DataType); template<class T> Debug& operator<<(Debug& debug, Attribute<T>::DataType);
#endif #endif
namespace Implementation { namespace Implementation {
@ -328,10 +328,10 @@ template<> struct SizedAttribute<1, 4>: SizedVectorAttribute<1> {
enum class Components: GLint { One = 1, Two = 2, Three = 3, Four = 4 }; enum class Components: GLint { One = 1, Two = 2, Three = 3, Four = 4 };
constexpr static Components DefaultComponents = Components::Four; constexpr static Components DefaultComponents = Components::Four;
}; };
Debug MAGNUM_EXPORT operator<<(Debug debug, SizedAttribute<1, 1>::Components value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, SizedAttribute<1, 1>::Components value);
Debug MAGNUM_EXPORT operator<<(Debug debug, SizedAttribute<1, 2>::Components value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, SizedAttribute<1, 2>::Components value);
Debug MAGNUM_EXPORT operator<<(Debug debug, SizedAttribute<1, 3>::Components value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, SizedAttribute<1, 3>::Components value);
Debug MAGNUM_EXPORT operator<<(Debug debug, SizedAttribute<1, 4>::Components value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, SizedAttribute<1, 4>::Components value);
/* Matrix attribute sizes */ /* Matrix attribute sizes */
template<std::size_t rows> struct SizedMatrixAttribute; template<std::size_t rows> struct SizedMatrixAttribute;
@ -347,9 +347,9 @@ template<> struct SizedMatrixAttribute<4> {
enum class Components: GLint { Four = 4 }; enum class Components: GLint { Four = 4 };
constexpr static Components DefaultComponents = Components::Four; constexpr static Components DefaultComponents = Components::Four;
}; };
Debug MAGNUM_EXPORT operator<<(Debug debug, SizedMatrixAttribute<2>::Components value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, SizedMatrixAttribute<2>::Components value);
Debug MAGNUM_EXPORT operator<<(Debug debug, SizedMatrixAttribute<3>::Components value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, SizedMatrixAttribute<3>::Components value);
Debug MAGNUM_EXPORT operator<<(Debug debug, SizedMatrixAttribute<4>::Components value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, SizedMatrixAttribute<4>::Components value);
template<> struct SizedAttribute<2, 2>: SizedVectorAttribute<2>, SizedMatrixAttribute<2> {}; template<> struct SizedAttribute<2, 2>: SizedVectorAttribute<2>, SizedMatrixAttribute<2> {};
template<> struct SizedAttribute<3, 3>: SizedVectorAttribute<3>, SizedMatrixAttribute<3> {}; template<> struct SizedAttribute<3, 3>: SizedVectorAttribute<3>, SizedMatrixAttribute<3> {};
template<> struct SizedAttribute<4, 4>: SizedVectorAttribute<4>, SizedMatrixAttribute<4> {}; template<> struct SizedAttribute<4, 4>: SizedVectorAttribute<4>, SizedMatrixAttribute<4> {};
@ -400,7 +400,7 @@ struct FloatAttribute {
CORRADE_ENUMSET_OPERATORS(FloatAttribute::DataOptions) CORRADE_ENUMSET_OPERATORS(FloatAttribute::DataOptions)
Debug MAGNUM_EXPORT operator<<(Debug debug, FloatAttribute::DataType value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, FloatAttribute::DataType value);
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
/* Base for int attributes */ /* Base for int attributes */
@ -425,7 +425,7 @@ struct IntAttribute {
CORRADE_ENUMSET_OPERATORS(IntAttribute::DataOptions) CORRADE_ENUMSET_OPERATORS(IntAttribute::DataOptions)
Debug MAGNUM_EXPORT operator<<(Debug debug, IntAttribute::DataType value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, IntAttribute::DataType value);
/* Base for unsigned int attributes */ /* Base for unsigned int attributes */
struct UnsignedIntAttribute { struct UnsignedIntAttribute {
@ -459,7 +459,7 @@ struct DoubleAttribute {
static UnsignedInt MAGNUM_EXPORT size(GLint components, DataType dataType); static UnsignedInt MAGNUM_EXPORT size(GLint components, DataType dataType);
}; };
Debug MAGNUM_EXPORT operator<<(Debug debug, DoubleAttribute::DataType value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, DoubleAttribute::DataType value);
#endif #endif
/* Floating-point three-component vector has additional data type compared to /* Floating-point three-component vector has additional data type compared to
@ -495,7 +495,7 @@ template<> struct Attribute<Math::Vector<3, Float>>: SizedAttribute<1, 3> {
static UnsignedInt MAGNUM_EXPORT size(GLint components, DataType dataType); static UnsignedInt MAGNUM_EXPORT size(GLint components, DataType dataType);
}; };
Debug MAGNUM_EXPORT operator<<(Debug debug, Attribute<Math::Vector<3, Float>>::DataType value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Attribute<Math::Vector<3, Float>>::DataType value);
/* Floating-point four-component vector is absolutely special case */ /* Floating-point four-component vector is absolutely special case */
template<> struct Attribute<Math::Vector<4, Float>> { template<> struct Attribute<Math::Vector<4, Float>> {
@ -546,8 +546,8 @@ template<> struct Attribute<Math::Vector<4, Float>> {
static UnsignedInt MAGNUM_EXPORT size(GLint components, DataType dataType); static UnsignedInt MAGNUM_EXPORT size(GLint components, DataType dataType);
}; };
Debug MAGNUM_EXPORT operator<<(Debug debug, Attribute<Math::Vector<4, Float>>::Components value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Attribute<Math::Vector<4, Float>>::Components value);
Debug MAGNUM_EXPORT operator<<(Debug debug, Attribute<Math::Vector<4, Float>>::DataType value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Attribute<Math::Vector<4, Float>>::DataType value);
/* Common float, int, unsigned int and double scalar attributes */ /* Common float, int, unsigned int and double scalar attributes */
template<> struct Attribute<Float>: FloatAttribute, SizedAttribute<1, 1> {}; template<> struct Attribute<Float>: FloatAttribute, SizedAttribute<1, 1> {};

2
src/Magnum/Audio/Buffer.cpp

@ -29,7 +29,7 @@
namespace Magnum { namespace Audio { namespace Magnum { namespace Audio {
Debug operator<<(Debug debug, const Buffer::Format value) { Debug& operator<<(Debug& debug, const Buffer::Format value) {
switch(value) { switch(value) {
#define _c(value) case Buffer::Format::value: return debug << "Audio::Buffer::Format::" #value; #define _c(value) case Buffer::Format::value: return debug << "Audio::Buffer::Format::" #value;
_c(Mono8) _c(Mono8)

2
src/Magnum/Audio/Buffer.h

@ -105,7 +105,7 @@ class Buffer {
}; };
/** @debugoperatorclassenum{Magnum::Audio::Buffer,Magnum::Audio::Buffer::Format} */ /** @debugoperatorclassenum{Magnum::Audio::Buffer,Magnum::Audio::Buffer::Format} */
Debug MAGNUM_AUDIO_EXPORT operator<<(Debug debug, Buffer::Format value); MAGNUM_AUDIO_EXPORT Debug& operator<<(Debug& debug, Buffer::Format value);
inline Buffer::Buffer(Buffer&& other): _id(other._id) { inline Buffer::Buffer(Buffer&& other): _id(other._id) {
other._id = 0; other._id = 0;

4
src/Magnum/Audio/Renderer.cpp

@ -29,7 +29,7 @@
namespace Magnum { namespace Audio { namespace Magnum { namespace Audio {
Debug operator<<(Debug debug, const Renderer::Error value) { Debug& operator<<(Debug& debug, const Renderer::Error value) {
switch(value) { switch(value) {
#define _c(value) case Renderer::Error::value: return debug << "Audio::Renderer::Error::" #value; #define _c(value) case Renderer::Error::value: return debug << "Audio::Renderer::Error::" #value;
_c(NoError) _c(NoError)
@ -44,7 +44,7 @@ Debug operator<<(Debug debug, const Renderer::Error value) {
return debug << "Audio::Renderer::Error::(invalid)"; return debug << "Audio::Renderer::Error::(invalid)";
} }
Debug operator<<(Debug debug, const Renderer::DistanceModel value) { Debug& operator<<(Debug& debug, const Renderer::DistanceModel value) {
switch(value) { switch(value) {
#define _c(value) case Renderer::DistanceModel::value: return debug << "Audio::Renderer::DistanceModel::" #value; #define _c(value) case Renderer::DistanceModel::value: return debug << "Audio::Renderer::DistanceModel::" #value;
_c(None) _c(None)

4
src/Magnum/Audio/Renderer.h

@ -260,10 +260,10 @@ class Renderer {
}; };
/** @debugoperatorclassenum{Magnum::Audio::Renderer,Magnum::Audio::Renderer::Error} */ /** @debugoperatorclassenum{Magnum::Audio::Renderer,Magnum::Audio::Renderer::Error} */
Debug MAGNUM_AUDIO_EXPORT operator<<(Debug debug, Renderer::Error value); MAGNUM_AUDIO_EXPORT Debug& operator<<(Debug& debug, Renderer::Error value);
/** @debugoperatorclassenum{Magnum::Audio::Renderer,Magnum::Audio::Renderer::DistanceModel} */ /** @debugoperatorclassenum{Magnum::Audio::Renderer,Magnum::Audio::Renderer::DistanceModel} */
Debug MAGNUM_AUDIO_EXPORT operator<<(Debug debug, Renderer::DistanceModel value); MAGNUM_AUDIO_EXPORT Debug& operator<<(Debug& debug, Renderer::DistanceModel value);
}} }}

2
src/Magnum/Audio/Source.cpp

@ -96,7 +96,7 @@ void Source::rewind(const std::vector<std::reference_wrapper<Source>>& sources)
alSourceRewindv(ids.size(), ids); alSourceRewindv(ids.size(), ids);
} }
Debug operator<<(Debug debug, const Source::State value) { Debug& operator<<(Debug& debug, const Source::State value) {
switch(value) { switch(value) {
#define _c(value) case Source::State::value: return debug << "Audio::Source::State::" #value; #define _c(value) case Source::State::value: return debug << "Audio::Source::State::" #value;
_c(Initial) _c(Initial)

2
src/Magnum/Audio/Source.h

@ -701,7 +701,7 @@ class MAGNUM_AUDIO_EXPORT Source {
}; };
/** @debugoperatorclassenum{Magnum::Audio::Source,Magnum::Audio::Source::State} */ /** @debugoperatorclassenum{Magnum::Audio::Source,Magnum::Audio::Source::State} */
Debug MAGNUM_AUDIO_EXPORT operator<<(Debug debug, Source::State value); MAGNUM_AUDIO_EXPORT Debug& operator<<(Debug& debug, Source::State value);
inline Source::Source(Source&& other): _id(other._id) { inline Source::Source(Source&& other): _id(other._id) {
other._id = 0; other._id = 0;

4
src/Magnum/Buffer.cpp

@ -622,7 +622,7 @@ bool Buffer::unmapImplementationDSAEXT() {
#endif #endif
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, Buffer::TargetHint value) { Debug& operator<<(Debug& debug, Buffer::TargetHint value) {
switch(value) { switch(value) {
#define _c(value) case Buffer::TargetHint::value: return debug << "Buffer::TargetHint::" #value; #define _c(value) case Buffer::TargetHint::value: return debug << "Buffer::TargetHint::" #value;
_c(Array) _c(Array)
@ -661,7 +661,7 @@ Debug operator<<(Debug debug, Buffer::TargetHint value) {
#if !defined(MAGNUM_TARGET_GLES2) || defined(MAGNUM_BUILD_DEPRECATED) #if !defined(MAGNUM_TARGET_GLES2) || defined(MAGNUM_BUILD_DEPRECATED)
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, Buffer::Target value) { Debug& operator<<(Debug& debug, Buffer::Target value) {
switch(value) { switch(value) {
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
#define _c(value) case Buffer::Target::value: return debug << "Buffer::Target::" #value; #define _c(value) case Buffer::Target::value: return debug << "Buffer::Target::" #value;

4
src/Magnum/Buffer.h

@ -1431,11 +1431,11 @@ CORRADE_ENUMSET_OPERATORS(Buffer::MapFlags)
#endif #endif
/** @debugoperatorclassenum{Magnum::Buffer,Magnum::Buffer::TargetHint} */ /** @debugoperatorclassenum{Magnum::Buffer,Magnum::Buffer::TargetHint} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Buffer::TargetHint value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Buffer::TargetHint value);
#if !defined(MAGNUM_TARGET_GLES2) || defined(MAGNUM_BUILD_DEPRECATED) #if !defined(MAGNUM_TARGET_GLES2) || defined(MAGNUM_BUILD_DEPRECATED)
/** @debugoperatorclassenum{Magnum::Buffer,Magnum::Buffer::Target} */ /** @debugoperatorclassenum{Magnum::Buffer,Magnum::Buffer::Target} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Buffer::Target value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Buffer::Target value);
#endif #endif
inline Buffer::Buffer(NoCreateT) noexcept: _id{0}, _targetHint{TargetHint::Array}, _flags{ObjectFlag::DeleteOnDestruction} inline Buffer::Buffer(NoCreateT) noexcept: _id{0}, _targetHint{TargetHint::Array}, _flags{ObjectFlag::DeleteOnDestruction}

2
src/Magnum/Context.cpp

@ -700,7 +700,7 @@ void Context::resetState(const States states) {
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, const Context::Flag value) { Debug& operator<<(Debug& debug, const Context::Flag value) {
switch(value) { switch(value) {
#define _c(value) case Context::Flag::value: return debug << "Context::Flag::" #value; #define _c(value) case Context::Flag::value: return debug << "Context::Flag::" #value;
_c(Debug) _c(Debug)

2
src/Magnum/Context.h

@ -485,7 +485,7 @@ class MAGNUM_EXPORT Context {
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
/** @debugoperatorclassenum{Magnum::Context,Magnum::Context::Flag} */ /** @debugoperatorclassenum{Magnum::Context,Magnum::Context::Flag} */
MAGNUM_EXPORT Debug operator<<(Debug debug, Context::Flag value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Context::Flag value);
#endif #endif
/** @hideinitializer /** @hideinitializer

12
src/Magnum/DebugOutput.cpp

@ -225,7 +225,7 @@ void DebugOutput::callbackImplementationKhr(const Callback callback, const void*
} }
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, const DebugOutput::Source value) { Debug& operator<<(Debug& debug, const DebugOutput::Source value) {
switch(value) { switch(value) {
#define _c(value) case DebugOutput::Source::value: return debug << "DebugOutput::Source::" #value; #define _c(value) case DebugOutput::Source::value: return debug << "DebugOutput::Source::" #value;
_c(Api) _c(Api)
@ -240,7 +240,7 @@ Debug operator<<(Debug debug, const DebugOutput::Source value) {
return debug << "DebugOutput::Source::(invalid)"; return debug << "DebugOutput::Source::(invalid)";
} }
Debug operator<<(Debug debug, const DebugOutput::Type value) { Debug& operator<<(Debug& debug, const DebugOutput::Type value) {
switch(value) { switch(value) {
#define _c(value) case DebugOutput::Type::value: return debug << "DebugOutput::Type::" #value; #define _c(value) case DebugOutput::Type::value: return debug << "DebugOutput::Type::" #value;
_c(Error) _c(Error)
@ -258,7 +258,7 @@ Debug operator<<(Debug debug, const DebugOutput::Type value) {
return debug << "DebugOutput::Type::(invalid)"; return debug << "DebugOutput::Type::(invalid)";
} }
Debug operator<<(Debug debug, const DebugOutput::Severity value) { Debug& operator<<(Debug& debug, const DebugOutput::Severity value) {
switch(value) { switch(value) {
#define _c(value) case DebugOutput::Severity::value: return debug << "DebugOutput::Severity::" #value; #define _c(value) case DebugOutput::Severity::value: return debug << "DebugOutput::Severity::" #value;
_c(High) _c(High)
@ -312,7 +312,7 @@ void DebugMessage::insertImplementationGremedy(Source, Type, UnsignedInt, DebugO
#endif #endif
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, const DebugMessage::Source value) { Debug& operator<<(Debug& debug, const DebugMessage::Source value) {
switch(value) { switch(value) {
#define _c(value) case DebugMessage::Source::value: return debug << "DebugMessage::Source::" #value; #define _c(value) case DebugMessage::Source::value: return debug << "DebugMessage::Source::" #value;
_c(ThirdParty) _c(ThirdParty)
@ -330,7 +330,7 @@ Debug operator<<(Debug debug, const DebugMessage::Source value) {
return debug << "DebugMessage::Source::(invalid)"; return debug << "DebugMessage::Source::(invalid)";
} }
Debug operator<<(Debug debug, const DebugMessage::Type value) { Debug& operator<<(Debug& debug, const DebugMessage::Type value) {
switch(value) { switch(value) {
#define _c(value) case DebugMessage::Type::value: return debug << "DebugMessage::Type::" #value; #define _c(value) case DebugMessage::Type::value: return debug << "DebugMessage::Type::" #value;
_c(Error) _c(Error)
@ -424,7 +424,7 @@ void DebugGroup::popImplementationExt() {
} }
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, const DebugGroup::Source value) { Debug& operator<<(Debug& debug, const DebugGroup::Source value) {
switch(value) { switch(value) {
#define _c(value) case DebugGroup::Source::value: return debug << "DebugGroup::Source::" #value; #define _c(value) case DebugGroup::Source::value: return debug << "DebugGroup::Source::" #value;
_c(ThirdParty) _c(ThirdParty)

12
src/Magnum/DebugOutput.h

@ -418,13 +418,13 @@ class MAGNUM_EXPORT DebugOutput {
}; };
/** @debugoperatorclassenum{Magnum::DebugOutput,Magnum::DebugOutput::Source} */ /** @debugoperatorclassenum{Magnum::DebugOutput,Magnum::DebugOutput::Source} */
Debug MAGNUM_EXPORT operator<<(Debug debug, DebugOutput::Source value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, DebugOutput::Source value);
/** @debugoperatorclassenum{Magnum::DebugOutput,Magnum::DebugOutput::Type} */ /** @debugoperatorclassenum{Magnum::DebugOutput,Magnum::DebugOutput::Type} */
Debug MAGNUM_EXPORT operator<<(Debug debug, DebugOutput::Type value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, DebugOutput::Type value);
/** @debugoperatorclassenum{Magnum::DebugOutput,Magnum::DebugOutput::Severity} */ /** @debugoperatorclassenum{Magnum::DebugOutput,Magnum::DebugOutput::Severity} */
Debug MAGNUM_EXPORT operator<<(Debug debug, DebugOutput::Severity value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, DebugOutput::Severity value);
/** /**
@brief Debug message @brief Debug message
@ -691,10 +691,10 @@ class MAGNUM_EXPORT DebugMessage {
}; };
/** @debugoperatorclassenum{Magnum::DebugMessage,Magnum::DebugMessage::Source} */ /** @debugoperatorclassenum{Magnum::DebugMessage,Magnum::DebugMessage::Source} */
Debug MAGNUM_EXPORT operator<<(Debug debug, DebugMessage::Source value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, DebugMessage::Source value);
/** @debugoperatorclassenum{Magnum::DebugMessage,Magnum::DebugMessage::Type} */ /** @debugoperatorclassenum{Magnum::DebugMessage,Magnum::DebugMessage::Type} */
Debug MAGNUM_EXPORT operator<<(Debug debug, DebugMessage::Type value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, DebugMessage::Type value);
/** /**
@brief Debug group @brief Debug group
@ -904,7 +904,7 @@ class MAGNUM_EXPORT DebugGroup {
}; };
/** @debugoperatorclassenum{Magnum::DebugGroup,Magnum::DebugGroup::Source} */ /** @debugoperatorclassenum{Magnum::DebugGroup,Magnum::DebugGroup::Source} */
Debug MAGNUM_EXPORT operator<<(Debug debug, DebugGroup::Source value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, DebugGroup::Source value);
} }
#else #else

2
src/Magnum/DefaultFramebuffer.cpp

@ -115,7 +115,7 @@ void DefaultFramebuffer::initializeContextBasedFunctionality(Context& context) {
} }
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, const DefaultFramebuffer::Status value) { Debug& operator<<(Debug& debug, const DefaultFramebuffer::Status value) {
switch(value) { switch(value) {
#define _c(value) case DefaultFramebuffer::Status::value: return debug << "DefaultFramebuffer::Status::" #value; #define _c(value) case DefaultFramebuffer::Status::value: return debug << "DefaultFramebuffer::Status::" #value;
_c(Complete) _c(Complete)

2
src/Magnum/DefaultFramebuffer.h

@ -476,7 +476,7 @@ class MAGNUM_EXPORT DefaultFramebuffer: public AbstractFramebuffer {
extern DefaultFramebuffer MAGNUM_EXPORT defaultFramebuffer; extern DefaultFramebuffer MAGNUM_EXPORT defaultFramebuffer;
/** @debugoperatorclassenum{Magnum::DefaultFramebuffer,Magnum::DefaultFramebuffer::Status} */ /** @debugoperatorclassenum{Magnum::DefaultFramebuffer,Magnum::DefaultFramebuffer::Status} */
Debug MAGNUM_EXPORT operator<<(Debug debug, DefaultFramebuffer::Status value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, DefaultFramebuffer::Status value);
} }

2
src/Magnum/Framebuffer.cpp

@ -349,7 +349,7 @@ void Framebuffer::textureLayerImplementationDSAEXT(BufferAttachment attachment,
#endif #endif
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, const Framebuffer::Status value) { Debug& operator<<(Debug& debug, const Framebuffer::Status value) {
switch(value) { switch(value) {
#define _c(value) case Framebuffer::Status::value: return debug << "Framebuffer::Status::" #value; #define _c(value) case Framebuffer::Status::value: return debug << "Framebuffer::Status::" #value;
_c(Complete) _c(Complete)

2
src/Magnum/Framebuffer.h

@ -785,7 +785,7 @@ class MAGNUM_EXPORT Framebuffer: public AbstractFramebuffer, public AbstractObje
}; };
/** @debugoperatorclassenum{Magnum::Framebuffer,Magnum::Framebuffer::Status} */ /** @debugoperatorclassenum{Magnum::Framebuffer,Magnum::Framebuffer::Status} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Framebuffer::Status value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Framebuffer::Status value);
inline Framebuffer::Framebuffer(Framebuffer&& other) noexcept { inline Framebuffer::Framebuffer(Framebuffer&& other) noexcept {
_id = other._id; _id = other._id;

12
src/Magnum/Math/Angle.h

@ -237,7 +237,7 @@ template<class T> constexpr Deg<T>::Deg(Unit<Rad, T> value): Unit<Math::Deg, T>(
template<class T> constexpr Rad<T>::Rad(Unit<Deg, T> value): Unit<Math::Rad, T>(T(value)*Math::Constants<T>::pi()/T(180)) {} template<class T> constexpr Rad<T>::Rad(Unit<Deg, T> value): Unit<Math::Rad, T>(T(value)*Math::Constants<T>::pi()/T(180)) {}
/** @debugoperator{Magnum::Math::Rad} */ /** @debugoperator{Magnum::Math::Rad} */
template<class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Unit<Rad, T>& value) { template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Unit<Rad, T>& value) {
debug << "Rad("; debug << "Rad(";
debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false); debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false);
debug << T(value) << ")"; debug << T(value) << ")";
@ -246,7 +246,7 @@ template<class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug deb
} }
/** @debugoperator{Magnum::Math::Deg} */ /** @debugoperator{Magnum::Math::Deg} */
template<class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Unit<Deg, T>& value) { template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Unit<Deg, T>& value) {
debug << "Deg("; debug << "Deg(";
debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false); debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false);
debug << T(value) << ")"; debug << T(value) << ")";
@ -256,11 +256,11 @@ template<class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug deb
/* Explicit instantiation for commonly used types */ /* Explicit instantiation for commonly used types */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Unit<Rad, Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Unit<Rad, Float>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Unit<Deg, Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Unit<Deg, Float>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Unit<Rad, Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Unit<Rad, Double>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Unit<Deg, Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Unit<Deg, Double>&);
#endif #endif
#endif #endif

2
src/Magnum/Math/BoolVector.h

@ -223,7 +223,7 @@ template<std::size_t size> class BoolVector {
}; };
/** @debugoperator{Magnum::Math::BoolVector} */ /** @debugoperator{Magnum::Math::BoolVector} */
template<std::size_t size> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const BoolVector<size>& value) { template<std::size_t size> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const BoolVector<size>& value) {
debug << "BoolVector("; debug << "BoolVector(";
debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false); debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false);
for(std::size_t i = 0; i != size; ++i) { for(std::size_t i = 0; i != size; ++i) {

4
src/Magnum/Math/Color.h

@ -534,12 +534,12 @@ MAGNUM_VECTORn_OPERATOR_IMPLEMENTATION(4, Color4)
#endif #endif
/** @debugoperator{Magnum::Math::Color3} */ /** @debugoperator{Magnum::Math::Color3} */
template<class T> inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Color3<T>& value) { template<class T> inline Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Color3<T>& value) {
return debug << static_cast<const Vector3<T>&>(value); return debug << static_cast<const Vector3<T>&>(value);
} }
/** @debugoperator{Magnum::Math::Color4} */ /** @debugoperator{Magnum::Math::Color4} */
template<class T> inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Color4<T>& value) { template<class T> inline Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Color4<T>& value) {
return debug << static_cast<const Vector4<T>&>(value); return debug << static_cast<const Vector4<T>&>(value);
} }

6
src/Magnum/Math/Complex.h

@ -476,7 +476,7 @@ template<class T> inline Complex<T> operator/(T scalar, const Complex<T>& comple
} }
/** @debugoperator{Magnum::Math::Complex} */ /** @debugoperator{Magnum::Math::Complex} */
template<class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Complex<T>& value) { template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Complex<T>& value) {
debug << "Complex("; debug << "Complex(";
debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false); debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false);
debug << value.real() << ", " << value.imaginary() << ")"; debug << value.real() << ", " << value.imaginary() << ")";
@ -486,9 +486,9 @@ template<class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug deb
/* Explicit instantiation for commonly used types */ /* Explicit instantiation for commonly used types */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Complex<Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Complex<Float>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Complex<Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Complex<Double>&);
#endif #endif
#endif #endif

2
src/Magnum/Math/Dual.h

@ -209,7 +209,7 @@ template<class T> class Dual {
#endif #endif
/** @debugoperator{Magnum::Math::Dual} */ /** @debugoperator{Magnum::Math::Dual} */
template<class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Dual<T>& value) { template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Dual<T>& value) {
debug << "Dual("; debug << "Dual(";
debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false); debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false);
debug << value.real() << ", " << value.dual() << ")"; debug << value.real() << ", " << value.dual() << ")";

6
src/Magnum/Math/DualComplex.h

@ -369,7 +369,7 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
}; };
/** @debugoperator{Magnum::Math::DualQuaternion} */ /** @debugoperator{Magnum::Math::DualQuaternion} */
template<class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const DualComplex<T>& value) { template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const DualComplex<T>& value) {
debug << "DualComplex({"; debug << "DualComplex({";
debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false); debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false);
debug << value.real().real() << ", " << value.real().imaginary() << "}, {" debug << value.real().real() << ", " << value.real().imaginary() << "}, {"
@ -380,9 +380,9 @@ template<class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug deb
/* Explicit instantiation for commonly used types */ /* Explicit instantiation for commonly used types */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const DualComplex<Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const DualComplex<Float>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const DualComplex<Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const DualComplex<Double>&);
#endif #endif
#endif #endif

6
src/Magnum/Math/DualQuaternion.h

@ -358,7 +358,7 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
}; };
/** @debugoperator{Magnum::Math::DualQuaternion} */ /** @debugoperator{Magnum::Math::DualQuaternion} */
template<class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const DualQuaternion<T>& value) { template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const DualQuaternion<T>& value) {
debug << "DualQuaternion({{"; debug << "DualQuaternion({{";
debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false); debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false);
debug << value.real().vector().x() << ", " << value.real().vector().y() << ", " << value.real().vector().z() debug << value.real().vector().x() << ", " << value.real().vector().y() << ", " << value.real().vector().z()
@ -371,9 +371,9 @@ template<class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug deb
/* Explicit instantiation for commonly used types */ /* Explicit instantiation for commonly used types */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const DualQuaternion<Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const DualQuaternion<Float>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const DualQuaternion<Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const DualQuaternion<Double>&);
#endif #endif
#endif #endif

2
src/Magnum/Math/Matrix.h

@ -266,7 +266,7 @@ template<class T> using Matrix4x4 = Matrix<4, T>;
MAGNUM_MATRIX_OPERATOR_IMPLEMENTATION(Matrix<size, T>) MAGNUM_MATRIX_OPERATOR_IMPLEMENTATION(Matrix<size, T>)
/** @debugoperator{Magnum::Math::Matrix} */ /** @debugoperator{Magnum::Math::Matrix} */
template<std::size_t size, class T> inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Matrix<size, T>& value) { template<std::size_t size, class T> inline Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Matrix<size, T>& value) {
return debug << static_cast<const RectangularMatrix<size, size, T>&>(value); return debug << static_cast<const RectangularMatrix<size, size, T>&>(value);
} }

2
src/Magnum/Math/Matrix3.h

@ -380,7 +380,7 @@ MAGNUM_MATRIXn_OPERATOR_IMPLEMENTATION(3, Matrix3)
#endif #endif
/** @debugoperator{Magnum::Math::Matrix3} */ /** @debugoperator{Magnum::Math::Matrix3} */
template<class T> inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Matrix3<T>& value) { template<class T> inline Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Matrix3<T>& value) {
return debug << static_cast<const Matrix3x3<T>&>(value); return debug << static_cast<const Matrix3x3<T>&>(value);
} }

2
src/Magnum/Math/Matrix4.h

@ -481,7 +481,7 @@ MAGNUM_MATRIXn_OPERATOR_IMPLEMENTATION(4, Matrix4)
#endif #endif
/** @debugoperator{Magnum::Math::Matrix4} */ /** @debugoperator{Magnum::Math::Matrix4} */
template<class T> inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Matrix4<T>& value) { template<class T> inline Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Matrix4<T>& value) {
return debug << static_cast<const Matrix4x4<T>&>(value); return debug << static_cast<const Matrix4x4<T>&>(value);
} }

6
src/Magnum/Math/Quaternion.h

@ -532,7 +532,7 @@ template<class T> inline Quaternion<T> operator/(T scalar, const Quaternion<T>&
} }
/** @debugoperator{Magnum::Math::Quaternion} */ /** @debugoperator{Magnum::Math::Quaternion} */
template<class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Quaternion<T>& value) { template<class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Quaternion<T>& value) {
debug << "Quaternion({"; debug << "Quaternion({";
debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false); debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false);
debug << value.vector().x() << ", " << value.vector().y() << ", " << value.vector().z() << "}, " << value.scalar() << ")"; debug << value.vector().x() << ", " << value.vector().y() << ", " << value.vector().z() << "}, " << value.scalar() << ")";
@ -542,9 +542,9 @@ template<class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug deb
/* Explicit instantiation for commonly used types */ /* Explicit instantiation for commonly used types */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Quaternion<Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Quaternion<Float>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Quaternion<Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Quaternion<Double>&);
#endif #endif
#endif #endif

2
src/Magnum/Math/Range.h

@ -529,7 +529,7 @@ template<class T> class Range3D: public Range<3, T> {
}; };
/** @debugoperator{Magnum::Math::Range} */ /** @debugoperator{Magnum::Math::Range} */
template<UnsignedInt dimensions, class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Range<dimensions, T>& value) { template<UnsignedInt dimensions, class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Range<dimensions, T>& value) {
debug << "Range({"; debug << "Range({";
debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false); debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false);
debug << value.min()[0]; debug << value.min()[0];

38
src/Magnum/Math/RectangularMatrix.h

@ -526,7 +526,7 @@ template<std::size_t size, std::size_t cols, class T> inline RectangularMatrix<c
} }
/** @debugoperator{Magnum::Math::RectangularMatrix} */ /** @debugoperator{Magnum::Math::RectangularMatrix} */
template<std::size_t cols, std::size_t rows, class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Magnum::Math::RectangularMatrix<cols, rows, T>& value) { template<std::size_t cols, std::size_t rows, class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Magnum::Math::RectangularMatrix<cols, rows, T>& value) {
debug << "Matrix("; debug << "Matrix(";
debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false); debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false);
for(std::size_t row = 0; row != rows; ++row) { for(std::size_t row = 0; row != rows; ++row) {
@ -544,29 +544,29 @@ template<std::size_t cols, std::size_t rows, class T> Corrade::Utility::Debug op
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
/* Explicit instantiation for types used in OpenGL */ /* Explicit instantiation for types used in OpenGL */
/* Square matrices */ /* Square matrices */
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<2, 2, Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<2, 2, Float>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<3, 3, Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<3, 3, Float>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<4, 4, Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<4, 4, Float>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<2, 2, Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<2, 2, Double>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<3, 3, Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<3, 3, Double>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<4, 4, Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<4, 4, Double>&);
#endif #endif
/* Rectangular matrices */ /* Rectangular matrices */
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<2, 3, Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<2, 3, Float>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<3, 2, Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<3, 2, Float>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<2, 4, Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<2, 4, Float>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<4, 2, Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<4, 2, Float>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<3, 4, Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<3, 4, Float>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<4, 3, Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<4, 3, Float>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<2, 3, Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<2, 3, Double>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<3, 2, Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<3, 2, Double>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<2, 4, Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<2, 4, Double>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<4, 2, Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<4, 2, Double>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<3, 4, Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<3, 4, Double>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const RectangularMatrix<4, 3, Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<4, 3, Double>&);
#endif #endif
#define MAGNUM_RECTANGULARMATRIX_SUBCLASS_IMPLEMENTATION(cols, rows, ...) \ #define MAGNUM_RECTANGULARMATRIX_SUBCLASS_IMPLEMENTATION(cols, rows, ...) \

2
src/Magnum/Math/Test/UnitTest.cpp

@ -63,7 +63,7 @@ typedef Unit<Sec_, Float> Sec;
typedef Unit<Sec_, Int> Seci; typedef Unit<Sec_, Int> Seci;
typedef Constants<Float> Constants; typedef Constants<Float> Constants;
inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, Sec value) { inline Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, Sec value) {
return debug << Float(value); return debug << Float(value);
} }

26
src/Magnum/Math/Vector.h

@ -1069,7 +1069,7 @@ operator/(const Vector<size, Integral>& a, const Vector<size, FloatingPoint>& b)
} }
/** @debugoperator{Magnum::Math::Vector} */ /** @debugoperator{Magnum::Math::Vector} */
template<std::size_t size, class T> Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Vector<size, T>& value) { template<std::size_t size, class T> Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Vector<size, T>& value) {
debug << "Vector("; debug << "Vector(";
debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false); debug.setFlag(Corrade::Utility::Debug::SpaceAfterEachValue, false);
for(std::size_t i = 0; i != size; ++i) { for(std::size_t i = 0; i != size; ++i) {
@ -1083,19 +1083,19 @@ template<std::size_t size, class T> Corrade::Utility::Debug operator<<(Corrade::
/* Explicit instantiation for types used in OpenGL */ /* Explicit instantiation for types used in OpenGL */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Vector<2, Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<2, Float>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Vector<3, Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<3, Float>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Vector<4, Float>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<4, Float>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Vector<2, Int>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<2, Int>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Vector<3, Int>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<3, Int>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Vector<4, Int>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<4, Int>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Vector<2, UnsignedInt>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<2, UnsignedInt>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Vector<3, UnsignedInt>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<3, UnsignedInt>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Vector<4, UnsignedInt>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<4, UnsignedInt>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Vector<2, Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<2, Double>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Vector<3, Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<3, Double>&);
extern template Corrade::Utility::Debug MAGNUM_EXPORT operator<<(Corrade::Utility::Debug, const Vector<4, Double>&); extern template MAGNUM_EXPORT Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<4, Double>&);
#endif #endif
#endif #endif

2
src/Magnum/Math/Vector2.h

@ -214,7 +214,7 @@ MAGNUM_VECTORn_OPERATOR_IMPLEMENTATION(2, Vector2)
#endif #endif
/** @debugoperator{Magnum::Math::Vector2} */ /** @debugoperator{Magnum::Math::Vector2} */
template<class T> inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Vector2<T>& value) { template<class T> inline Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Vector2<T>& value) {
return debug << static_cast<const Vector<2, T>&>(value); return debug << static_cast<const Vector<2, T>&>(value);
} }

2
src/Magnum/Math/Vector3.h

@ -267,7 +267,7 @@ MAGNUM_VECTORn_OPERATOR_IMPLEMENTATION(3, Vector3)
#endif #endif
/** @debugoperator{Magnum::Math::Vector3} */ /** @debugoperator{Magnum::Math::Vector3} */
template<class T> inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Vector3<T>& value) { template<class T> inline Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Vector3<T>& value) {
return debug << static_cast<const Vector<3, T>&>(value); return debug << static_cast<const Vector<3, T>&>(value);
} }

2
src/Magnum/Math/Vector4.h

@ -221,7 +221,7 @@ MAGNUM_VECTORn_OPERATOR_IMPLEMENTATION(4, Vector4)
#endif #endif
/** @debugoperator{Magnum::Math::Vector4} */ /** @debugoperator{Magnum::Math::Vector4} */
template<class T> inline Corrade::Utility::Debug operator<<(Corrade::Utility::Debug debug, const Vector4<T>& value) { template<class T> inline Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug& debug, const Vector4<T>& value) {
return debug << static_cast<const Vector<4, T>&>(value); return debug << static_cast<const Vector<4, T>&>(value);
} }

88
src/Magnum/Math/instantiation.cpp

@ -84,24 +84,24 @@ template struct ConfigurationValue<Magnum::Math::Range<3, Magnum::Double>>;
namespace Magnum { namespace Math { namespace Magnum { namespace Math {
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Complex<Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Complex<Float>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Complex<Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Complex<Double>&);
#endif #endif
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const DualComplex<Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const DualComplex<Float>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const DualComplex<Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const DualComplex<Double>&);
#endif #endif
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const DualQuaternion<Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const DualQuaternion<Float>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const DualQuaternion<Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const DualQuaternion<Double>&);
#endif #endif
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Quaternion<Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Quaternion<Float>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Quaternion<Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Quaternion<Double>&);
#endif #endif
/* Check proper size of GL types */ /* Check proper size of GL types */
@ -144,50 +144,50 @@ static_assert(sizeof(RectangularMatrix<3, 4, Double>) == 96, "Improper size of 3
static_assert(sizeof(RectangularMatrix<4, 3, Double>) == 96, "Improper size of 4x3 Double matrix"); static_assert(sizeof(RectangularMatrix<4, 3, Double>) == 96, "Improper size of 4x3 Double matrix");
#endif #endif
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<2, 2, Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<2, 2, Float>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<3, 3, Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<3, 3, Float>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<4, 4, Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<4, 4, Float>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<2, 2, Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<2, 2, Double>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<3, 3, Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<3, 3, Double>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<4, 4, Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<4, 4, Double>&);
#endif #endif
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<2, 3, Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<2, 3, Float>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<3, 2, Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<3, 2, Float>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<2, 4, Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<2, 4, Float>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<4, 2, Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<4, 2, Float>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<3, 4, Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<3, 4, Float>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<4, 3, Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<4, 3, Float>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<2, 3, Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<2, 3, Double>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<3, 2, Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<3, 2, Double>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<2, 4, Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<2, 4, Double>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<4, 2, Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<4, 2, Double>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<3, 4, Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<3, 4, Double>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const RectangularMatrix<4, 3, Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const RectangularMatrix<4, 3, Double>&);
#endif #endif
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Unit<Rad, Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Unit<Rad, Float>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Unit<Deg, Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Unit<Deg, Float>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Unit<Rad, Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Unit<Rad, Double>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Unit<Deg, Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Unit<Deg, Double>&);
#endif #endif
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Vector<2, Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<2, Float>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Vector<3, Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<3, Float>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Vector<4, Float>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<4, Float>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Vector<2, Int>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<2, Int>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Vector<3, Int>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<3, Int>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Vector<4, Int>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<4, Int>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Vector<2, UnsignedInt>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<2, UnsignedInt>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Vector<3, UnsignedInt>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<3, UnsignedInt>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Vector<4, UnsignedInt>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<4, UnsignedInt>&);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Vector<2, Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<2, Double>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Vector<3, Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<3, Double>&);
template Corrade::Utility::Debug operator<<(Corrade::Utility::Debug, const Vector<4, Double>&); template Corrade::Utility::Debug& operator<<(Corrade::Utility::Debug&, const Vector<4, Double>&);
#endif #endif
#endif #endif

4
src/Magnum/Mesh.cpp

@ -635,7 +635,7 @@ void Mesh::drawElementsInstancedImplementationNV(const GLsizei count, const GLin
#endif #endif
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, MeshPrimitive value) { Debug& operator<<(Debug& debug, MeshPrimitive value) {
switch(value) { switch(value) {
#define _c(value) case MeshPrimitive::value: return debug << "MeshPrimitive::" #value; #define _c(value) case MeshPrimitive::value: return debug << "MeshPrimitive::" #value;
_c(Points) _c(Points)
@ -660,7 +660,7 @@ Debug operator<<(Debug debug, MeshPrimitive value) {
return debug << "MeshPrimitive::(invalid)"; return debug << "MeshPrimitive::(invalid)";
} }
Debug operator<<(Debug debug, Mesh::IndexType value) { Debug& operator<<(Debug& debug, Mesh::IndexType value) {
switch(value) { switch(value) {
#define _c(value) case Mesh::IndexType::value: return debug << "Mesh::IndexType::" #value; #define _c(value) case Mesh::IndexType::value: return debug << "Mesh::IndexType::" #value;
_c(UnsignedByte) _c(UnsignedByte)

4
src/Magnum/Mesh.h

@ -1018,10 +1018,10 @@ class MAGNUM_EXPORT Mesh: public AbstractObject {
}; };
/** @debugoperatorenum{Magnum::MeshPrimitive} */ /** @debugoperatorenum{Magnum::MeshPrimitive} */
Debug MAGNUM_EXPORT operator<<(Debug debug, MeshPrimitive value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, MeshPrimitive value);
/** @debugoperatorclassenum{Magnum::Mesh,Magnum::Mesh::IndexType} */ /** @debugoperatorclassenum{Magnum::Mesh,Magnum::Mesh::IndexType} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Mesh::IndexType value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Mesh::IndexType value);
inline GLuint Mesh::release() { inline GLuint Mesh::release() {
const GLuint id = _id; const GLuint id = _id;

6
src/Magnum/PixelFormat.cpp

@ -30,7 +30,7 @@
namespace Magnum { namespace Magnum {
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, const PixelFormat value) { Debug& operator<<(Debug& debug, const PixelFormat value) {
switch(value) { switch(value) {
#define _c(value) case PixelFormat::value: return debug << "PixelFormat::" #value; #define _c(value) case PixelFormat::value: return debug << "PixelFormat::" #value;
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
@ -82,7 +82,7 @@ Debug operator<<(Debug debug, const PixelFormat value) {
return debug << "PixelFormat::(invalid)"; return debug << "PixelFormat::(invalid)";
} }
Debug operator<<(Debug debug, const PixelType value) { Debug& operator<<(Debug& debug, const PixelType value) {
switch(value) { switch(value) {
#define _c(value) case PixelType::value: return debug << "PixelType::" #value; #define _c(value) case PixelType::value: return debug << "PixelType::" #value;
_c(UnsignedByte) _c(UnsignedByte)
@ -137,7 +137,7 @@ Debug operator<<(Debug debug, const PixelType value) {
return debug << "PixelType::(invalid)"; return debug << "PixelType::(invalid)";
} }
Debug operator<<(Debug debug, const CompressedPixelFormat value) { Debug& operator<<(Debug& debug, const CompressedPixelFormat value) {
switch(value) { switch(value) {
#define _c(value) case CompressedPixelFormat::value: return debug << "CompressedPixelFormat::" #value; #define _c(value) case CompressedPixelFormat::value: return debug << "CompressedPixelFormat::" #value;
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES

6
src/Magnum/PixelFormat.h

@ -1193,13 +1193,13 @@ enum class CompressedPixelFormat: GLenum {
}; };
/** @debugoperatorenum{Magnum::PixelFormat} */ /** @debugoperatorenum{Magnum::PixelFormat} */
Debug MAGNUM_EXPORT operator<<(Debug debug, PixelFormat value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, PixelFormat value);
/** @debugoperatorenum{Magnum::PixelType} */ /** @debugoperatorenum{Magnum::PixelType} */
Debug MAGNUM_EXPORT operator<<(Debug debug, PixelType value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, PixelType value);
/** @debugoperatorenum{Magnum::CompressedPixelFormat} */ /** @debugoperatorenum{Magnum::CompressedPixelFormat} */
Debug MAGNUM_EXPORT operator<<(Debug debug, CompressedPixelFormat value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, CompressedPixelFormat value);
} }

6
src/Magnum/Renderer.cpp

@ -238,7 +238,7 @@ Renderer::GraphicsResetStatus Renderer::graphicsResetStatusImplementationRobustn
#endif #endif
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, const Renderer::Error value) { Debug& operator<<(Debug& debug, const Renderer::Error value) {
switch(value) { switch(value) {
#define _c(value) case Renderer::Error::value: return debug << "Renderer::Error::" #value; #define _c(value) case Renderer::Error::value: return debug << "Renderer::Error::" #value;
_c(NoError) _c(NoError)
@ -258,7 +258,7 @@ Debug operator<<(Debug debug, const Renderer::Error value) {
} }
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
Debug operator<<(Debug debug, const Renderer::ResetNotificationStrategy value) { Debug& operator<<(Debug& debug, const Renderer::ResetNotificationStrategy value) {
switch(value) { switch(value) {
#define _c(value) case Renderer::ResetNotificationStrategy::value: return debug << "Renderer::ResetNotificationStrategy::" #value; #define _c(value) case Renderer::ResetNotificationStrategy::value: return debug << "Renderer::ResetNotificationStrategy::" #value;
_c(NoResetNotification) _c(NoResetNotification)
@ -269,7 +269,7 @@ Debug operator<<(Debug debug, const Renderer::ResetNotificationStrategy value) {
return debug << "Renderer::ResetNotificationStrategy::(invalid)"; return debug << "Renderer::ResetNotificationStrategy::(invalid)";
} }
Debug operator<<(Debug debug, const Renderer::GraphicsResetStatus value) { Debug& operator<<(Debug& debug, const Renderer::GraphicsResetStatus value) {
switch(value) { switch(value) {
#define _c(value) case Renderer::GraphicsResetStatus::value: return debug << "Renderer::GraphicsResetStatus::" #value; #define _c(value) case Renderer::GraphicsResetStatus::value: return debug << "Renderer::GraphicsResetStatus::" #value;
_c(NoError) _c(NoError)

6
src/Magnum/Renderer.h

@ -1436,14 +1436,14 @@ class MAGNUM_EXPORT Renderer {
}; };
/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::Error} */ /** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::Error} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Renderer::Error value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Renderer::Error value);
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::ResetNotificationStrategy} */ /** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::ResetNotificationStrategy} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Renderer::ResetNotificationStrategy value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Renderer::ResetNotificationStrategy value);
/** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::GraphicsResetStatus} */ /** @debugoperatorclassenum{Magnum::Renderer,Magnum::Renderer::GraphicsResetStatus} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Renderer::GraphicsResetStatus value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Renderer::GraphicsResetStatus value);
#endif #endif
} }

2
src/Magnum/Resource.cpp

@ -28,7 +28,7 @@
namespace Magnum { namespace Magnum {
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug MAGNUM_EXPORT operator<<(Debug debug, ResourceState value) { Debug& operator<<(Debug& debug, const ResourceState value) {
switch(value) { switch(value) {
#define _c(value) case ResourceState::value: return debug << "ResourceState::" #value; #define _c(value) case ResourceState::value: return debug << "ResourceState::" #value;
_c(NotLoaded) _c(NotLoaded)

4
src/Magnum/Resource.h

@ -69,7 +69,7 @@ enum class ResourceState: UnsignedByte {
}; };
/** @debugoperatorenum{Magnum::ResourceState} */ /** @debugoperatorenum{Magnum::ResourceState} */
Debug MAGNUM_EXPORT operator<<(Debug debug, ResourceState value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, ResourceState value);
/** /**
@brief Key for accessing resource @brief Key for accessing resource
@ -100,7 +100,7 @@ class ResourceKey: public Utility::MurmurHash2::Digest {
}; };
/** @debugoperator{Magnum::ResourceKey} */ /** @debugoperator{Magnum::ResourceKey} */
inline Debug operator<<(Debug debug, const ResourceKey& value) { inline Debug& operator<<(Debug& debug, const ResourceKey& value) {
return debug << static_cast<const Utility::HashDigest<sizeof(std::size_t)>&>(value); return debug << static_cast<const Utility::HashDigest<sizeof(std::size_t)>&>(value);
} }

12
src/Magnum/Sampler.cpp

@ -61,7 +61,7 @@ Float Sampler::maxMaxAnisotropy() {
} }
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, const Sampler::Filter value) { Debug& operator<<(Debug& debug, const Sampler::Filter value) {
switch(value) { switch(value) {
#define _c(value) case Sampler::Filter::value: return debug << "Sampler::Filter::" #value; #define _c(value) case Sampler::Filter::value: return debug << "Sampler::Filter::" #value;
_c(Nearest) _c(Nearest)
@ -72,7 +72,7 @@ Debug operator<<(Debug debug, const Sampler::Filter value) {
return debug << "Sampler::Filter::(invalid)"; return debug << "Sampler::Filter::(invalid)";
} }
Debug operator<<(Debug debug, const Sampler::Mipmap value) { Debug& operator<<(Debug& debug, const Sampler::Mipmap value) {
switch(value) { switch(value) {
#define _c(value) case Sampler::Mipmap::value: return debug << "Sampler::Mipmap::" #value; #define _c(value) case Sampler::Mipmap::value: return debug << "Sampler::Mipmap::" #value;
_c(Base) _c(Base)
@ -84,7 +84,7 @@ Debug operator<<(Debug debug, const Sampler::Mipmap value) {
return debug << "Sampler::Mipmap::(invalid)"; return debug << "Sampler::Mipmap::(invalid)";
} }
Debug operator<<(Debug debug, const Sampler::Wrapping value) { Debug& operator<<(Debug& debug, const Sampler::Wrapping value) {
switch(value) { switch(value) {
#define _c(value) case Sampler::Wrapping::value: return debug << "Sampler::Wrapping::" #value; #define _c(value) case Sampler::Wrapping::value: return debug << "Sampler::Wrapping::" #value;
_c(Repeat) _c(Repeat)
@ -103,7 +103,7 @@ Debug operator<<(Debug debug, const Sampler::Wrapping value) {
} }
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
Debug operator<<(Debug debug, const Sampler::CompareMode value) { Debug& operator<<(Debug& debug, const Sampler::CompareMode value) {
switch(value) { switch(value) {
#define _c(value) case Sampler::CompareMode::value: return debug << "Sampler::CompareMode::" #value; #define _c(value) case Sampler::CompareMode::value: return debug << "Sampler::CompareMode::" #value;
_c(None) _c(None)
@ -114,7 +114,7 @@ Debug operator<<(Debug debug, const Sampler::CompareMode value) {
return debug << "Sampler::CompareFunction::(invalid)"; return debug << "Sampler::CompareFunction::(invalid)";
} }
Debug operator<<(Debug debug, const Sampler::CompareFunction value) { Debug& operator<<(Debug& debug, const Sampler::CompareFunction value) {
switch(value) { switch(value) {
#define _c(value) case Sampler::CompareFunction::value: return debug << "Sampler::CompareFunction::" #value; #define _c(value) case Sampler::CompareFunction::value: return debug << "Sampler::CompareFunction::" #value;
_c(Never) _c(Never)
@ -133,7 +133,7 @@ Debug operator<<(Debug debug, const Sampler::CompareFunction value) {
#endif #endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
Debug operator<<(Debug debug, const Sampler::DepthStencilMode value) { Debug& operator<<(Debug& debug, const Sampler::DepthStencilMode value) {
switch(value) { switch(value) {
#define _c(value) case Sampler::DepthStencilMode::value: return debug << "Sampler::DepthStencilMode::" #value; #define _c(value) case Sampler::DepthStencilMode::value: return debug << "Sampler::DepthStencilMode::" #value;
_c(DepthComponent) _c(DepthComponent)

12
src/Magnum/Sampler.h

@ -256,25 +256,25 @@ class MAGNUM_EXPORT Sampler {
}; };
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Filter} */ /** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Filter} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::Filter value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Sampler::Filter value);
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Mipmap} */ /** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Mipmap} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::Mipmap value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Sampler::Mipmap value);
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Wrapping} */ /** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::Wrapping} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::Wrapping value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Sampler::Wrapping value);
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::CompareMode} */ /** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::CompareMode} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::CompareMode value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Sampler::CompareMode value);
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::CompareFunction} */ /** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::CompareFunction} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::CompareFunction value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Sampler::CompareFunction value);
#endif #endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::DepthStencilMode} */ /** @debugoperatorclassenum{Magnum::Sampler,Magnum::Sampler::DepthStencilMode} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Sampler::DepthStencilMode value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Sampler::DepthStencilMode value);
#endif #endif
} }

2
src/Magnum/SceneGraph/Animable.cpp

@ -29,7 +29,7 @@
namespace Magnum { namespace SceneGraph { namespace Magnum { namespace SceneGraph {
Debug operator<<(Debug debug, AnimationState value) { Debug& operator<<(Debug& debug, AnimationState value) {
switch(value) { switch(value) {
#define _c(value) case AnimationState::value: return debug << "SceneGraph::AnimationState::" #value; #define _c(value) case AnimationState::value: return debug << "SceneGraph::AnimationState::" #value;
_c(Stopped) _c(Stopped)

2
src/Magnum/SceneGraph/Animable.h

@ -57,7 +57,7 @@ enum class AnimationState: UnsignedByte {
}; };
/** @debugoperatorenum{Magnum::SceneGraph::AnimationState} */ /** @debugoperatorenum{Magnum::SceneGraph::AnimationState} */
Debug MAGNUM_SCENEGRAPH_EXPORT operator<<(Debug debug, AnimationState value); MAGNUM_SCENEGRAPH_EXPORT Debug& operator<<(Debug& debug, AnimationState value);
/** /**
@brief Animable @brief Animable

2
src/Magnum/Shader.cpp

@ -898,7 +898,7 @@ bool Shader::compile(std::initializer_list<std::reference_wrapper<Shader>> shade
} }
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, const Shader::Type value) { Debug& operator<<(Debug& debug, const Shader::Type value) {
switch(value) { switch(value) {
#define _c(value) case Shader::Type::value: return debug << "Shader::Type::" #value; #define _c(value) case Shader::Type::value: return debug << "Shader::Type::" #value;
_c(Vertex) _c(Vertex)

2
src/Magnum/Shader.h

@ -630,7 +630,7 @@ class MAGNUM_EXPORT Shader: public AbstractObject {
}; };
/** @debugoperatorclassenum{Magnum::Shader,Magnum::Shader::Type} */ /** @debugoperatorclassenum{Magnum::Shader,Magnum::Shader::Type} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Shader::Type value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Shader::Type value);
inline Shader::Shader(Shader&& other) noexcept: _type(other._type), _id(other._id), _sources(std::move(other._sources)) { inline Shader::Shader(Shader&& other) noexcept: _type(other._type), _id(other._id), _sources(std::move(other._sources)) {
other._id = 0; other._id = 0;

2
src/Magnum/Shapes/Composition.h

@ -195,7 +195,7 @@ typedef Composition<3> Composition3D;
#ifdef DOXYGEN_GENERATING_OUTPUT #ifdef DOXYGEN_GENERATING_OUTPUT
/** @debugoperatorclassenum{Magnum::Shapes::Composition,Magnum::Shapes::Composition::Type} */ /** @debugoperatorclassenum{Magnum::Shapes::Composition,Magnum::Shapes::Composition::Type} */
template<UnsignedInt dimensions> Debug operator<<(Debug debug, typename Composition<dimensions>::Type value); template<UnsignedInt dimensions> Debug& operator<<(Debug& debug, typename Composition<dimensions>::Type value);
#endif #endif
/** @relates Composition /** @relates Composition

4
src/Magnum/Shapes/shapeImplementation.cpp

@ -29,7 +29,7 @@
namespace Magnum { namespace Shapes { namespace Implementation { namespace Magnum { namespace Shapes { namespace Implementation {
Debug operator<<(Debug debug, ShapeDimensionTraits<2>::Type value) { Debug& operator<<(Debug& debug, ShapeDimensionTraits<2>::Type value) {
switch(value) { switch(value) {
#define _val(value) case ShapeDimensionTraits<2>::Type::value: return debug << "Shapes::Shape2D::Type::" #value; #define _val(value) case ShapeDimensionTraits<2>::Type::value: return debug << "Shapes::Shape2D::Type::" #value;
_val(Point) _val(Point)
@ -48,7 +48,7 @@ Debug operator<<(Debug debug, ShapeDimensionTraits<2>::Type value) {
return debug << "Shapes::Shape2D::Type::(unknown)"; return debug << "Shapes::Shape2D::Type::(unknown)";
} }
Debug operator<<(Debug debug, ShapeDimensionTraits<3>::Type value) { Debug& operator<<(Debug& debug, ShapeDimensionTraits<3>::Type value) {
switch(value) { switch(value) {
#define _val(value) case ShapeDimensionTraits<3>::Type::value: return debug << "Shapes::Shape3D::Type::" #value; #define _val(value) case ShapeDimensionTraits<3>::Type::value: return debug << "Shapes::Shape3D::Type::" #value;
_val(Point) _val(Point)

4
src/Magnum/Shapes/shapeImplementation.h

@ -87,8 +87,8 @@ template<> struct ShapeDimensionTraits<3> {
}; };
}; };
Debug MAGNUM_SHAPES_EXPORT operator<<(Debug debug, ShapeDimensionTraits<2>::Type value); MAGNUM_SHAPES_EXPORT Debug& operator<<(Debug& debug, ShapeDimensionTraits<2>::Type value);
Debug MAGNUM_SHAPES_EXPORT operator<<(Debug debug, ShapeDimensionTraits<3>::Type value); MAGNUM_SHAPES_EXPORT Debug& operator<<(Debug& debug, ShapeDimensionTraits<3>::Type value);
/* Enum value corresponding to given type */ /* Enum value corresponding to given type */

2
src/Magnum/Trade/AbstractMaterialData.cpp

@ -33,7 +33,7 @@ AbstractMaterialData::AbstractMaterialData(MaterialType type): _type(type) {}
AbstractMaterialData::~AbstractMaterialData() {} AbstractMaterialData::~AbstractMaterialData() {}
Debug operator<<(Debug debug, const MaterialType value) { Debug& operator<<(Debug& debug, const MaterialType value) {
switch(value) { switch(value) {
#define _c(value) case MaterialType::value: return debug << "Trade::MaterialType::" #value; #define _c(value) case MaterialType::value: return debug << "Trade::MaterialType::" #value;
_c(Phong) _c(Phong)

2
src/Magnum/Trade/AbstractMaterialData.h

@ -79,7 +79,7 @@ class MAGNUM_EXPORT AbstractMaterialData {
}; };
/** @debugoperatorenum{Magnum::Trade::MaterialType} */ /** @debugoperatorenum{Magnum::Trade::MaterialType} */
Debug MAGNUM_EXPORT operator<<(Debug debug, MaterialType value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, MaterialType value);
}} }}

2
src/Magnum/Trade/ObjectData2D.cpp

@ -38,7 +38,7 @@ ObjectData2D::~ObjectData2D() = default;
ObjectData2D& ObjectData2D::operator=(ObjectData2D&&) = default; ObjectData2D& ObjectData2D::operator=(ObjectData2D&&) = default;
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, ObjectInstanceType2D value) { Debug& operator<<(Debug& debug, ObjectInstanceType2D value) {
switch(value) { switch(value) {
#define _c(value) case ObjectInstanceType2D::value: return debug << "Trade::ObjectInstanceType2D::" #value; #define _c(value) case ObjectInstanceType2D::value: return debug << "Trade::ObjectInstanceType2D::" #value;
_c(Camera) _c(Camera)

2
src/Magnum/Trade/ObjectData2D.h

@ -121,7 +121,7 @@ class MAGNUM_EXPORT ObjectData2D {
}; };
/** @debugoperatorenum{Magnum::Trade::ObjectInstanceType2D} */ /** @debugoperatorenum{Magnum::Trade::ObjectInstanceType2D} */
Debug MAGNUM_EXPORT operator<<(Debug debug, ObjectInstanceType2D value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, ObjectInstanceType2D value);
}} }}

2
src/Magnum/Trade/ObjectData3D.cpp

@ -38,7 +38,7 @@ ObjectData3D::~ObjectData3D() = default;
ObjectData3D& ObjectData3D::operator=(ObjectData3D&&) = default; ObjectData3D& ObjectData3D::operator=(ObjectData3D&&) = default;
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, ObjectInstanceType3D value) { Debug& operator<<(Debug& debug, ObjectInstanceType3D value) {
switch(value) { switch(value) {
#define _c(value) case ObjectInstanceType3D::value: return debug << "Trade::ObjectInstanceType3D::" #value; #define _c(value) case ObjectInstanceType3D::value: return debug << "Trade::ObjectInstanceType3D::" #value;
_c(Camera) _c(Camera)

2
src/Magnum/Trade/ObjectData3D.h

@ -123,7 +123,7 @@ class MAGNUM_EXPORT ObjectData3D {
}; };
/** @debugoperatorenum{Magnum::Trade::ObjectInstanceType3D} */ /** @debugoperatorenum{Magnum::Trade::ObjectInstanceType3D} */
Debug MAGNUM_EXPORT operator<<(Debug debug, ObjectInstanceType3D value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, ObjectInstanceType3D value);
}} }}

2
src/Magnum/Trade/TextureData.cpp

@ -28,7 +28,7 @@
namespace Magnum { namespace Trade { namespace Magnum { namespace Trade {
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, const TextureData::Type value) { Debug& operator<<(Debug& debug, const TextureData::Type value) {
switch(value) { switch(value) {
#define _c(value) case TextureData::Type::value: return debug << "Trade::TextureData::Type::" #value; #define _c(value) case TextureData::Type::value: return debug << "Trade::TextureData::Type::" #value;
_c(Texture1D) _c(Texture1D)

2
src/Magnum/Trade/TextureData.h

@ -110,7 +110,7 @@ class TextureData {
}; };
/** @debugoperatorclassenum{Magnum::Trade::TextureData,Magnum::Trade::TextureData::Type} */ /** @debugoperatorclassenum{Magnum::Trade::TextureData,Magnum::Trade::TextureData::Type} */
Debug MAGNUM_EXPORT operator<<(Debug debug, TextureData::Type value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, TextureData::Type value);
}} }}

2
src/Magnum/Version.cpp

@ -30,7 +30,7 @@
namespace Magnum { namespace Magnum {
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, Version value) { Debug& operator<<(Debug& debug, Version value) {
switch(value) { switch(value) {
#define _c(value, string) case Version::value: return debug << string; #define _c(value, string) case Version::value: return debug << string;
_c(None, "None") _c(None, "None")

2
src/Magnum/Version.h

@ -110,7 +110,7 @@ inline std::pair<Int, Int> version(Version version) {
} }
/** @debugoperatorenum{Magnum::Version} */ /** @debugoperatorenum{Magnum::Version} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Version value); MAGNUM_EXPORT Debug& operator<<(Debug& debug, Version value);
} }

Loading…
Cancel
Save