snake5 icon

c++ has the best error messages ever

snake5 | PRO | 08/19/17 11:35:30 AM UTC | 0 ⭐ | 807 👁️ | Never ⏰ | []
C++ |

4.81 KB

|

None

|

0 👍

/

0 👎

src/sgs_ouzel.cpp: In static member function 'static sgsOuzelTexture::Handle sgsOuzel::createTexture()':
src/sgs_ouzel.cpp:625:13: error: no match for 'operator=' (operand types are 'std::shared_ptr<ouzel::graphics::Texture>' and 'ouzel::graphics::Texture*')
  h->texture = new Texture;
             ^
In file included from c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/memory:82:0,
                 from ouzel/ouzel/animators/Animator.hpp:6,
                 from ouzel/ouzel/ouzel.hpp:6,
                 from src/sgs_ouzel.hpp:9,
                 from src/sgs_ouzel.cpp:3:
c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/shared_ptr.h:271:19: note: candidate: std::shared_ptr<_Tp>& std::shared_ptr<_Tp>::operator=(const std::shared_ptr<_Tp>&) [with _Tp = ouzel::graphics::Texture]
       shared_ptr& operator=(const shared_ptr&) noexcept = default;
                   ^
c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/shared_ptr.h:271:19: note:   no known conversion for argument 1 from 'ouzel::graphics::Texture*' to 'const std::shared_ptr<ouzel::graphics::Texture>&'
c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/shared_ptr.h:275:2: note: candidate: template<class _Tp1> std::shared_ptr<_Tp>& std::shared_ptr<_Tp>::operator=(const std::shared_ptr<_Tp1>&) [with _Tp1 = _Tp1; _Tp = ouzel::graphics::Texture]
  operator=(const shared_ptr<_Tp1>& __r) noexcept
  ^
c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/shared_ptr.h:275:2: note:   template argument deduction/substitution failed:
src/sgs_ouzel.cpp:625:13: note:   mismatched types 'const std::shared_ptr<_Tp1>' and 'ouzel::graphics::Texture*'
  h->texture = new Texture;
             ^
In file included from c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/memory:82:0,
                 from ouzel/ouzel/animators/Animator.hpp:6,
                 from ouzel/ouzel/ouzel.hpp:6,
                 from src/sgs_ouzel.hpp:9,
                 from src/sgs_ouzel.cpp:3:
c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/shared_ptr.h:284:2: note: candidate: template<class _Tp1> std::shared_ptr<_Tp>& std::shared_ptr<_Tp>::operator=(std::auto_ptr<_Up>&&) [with _Tp1 = _Tp1; _Tp = ouzel::graphics::Texture]
  operator=(std::auto_ptr<_Tp1>&& __r)
  ^
c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/shared_ptr.h:284:2: note:   template argument deduction/substitution failed:
src/sgs_ouzel.cpp:625:13: note:   mismatched types 'std::auto_ptr<_Up>' and 'ouzel::graphics::Texture*'
  h->texture = new Texture;
             ^
In file included from c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/memory:82:0,
                 from ouzel/ouzel/animators/Animator.hpp:6,
                 from ouzel/ouzel/ouzel.hpp:6,
                 from src/sgs_ouzel.hpp:9,
                 from src/sgs_ouzel.cpp:3:
c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/shared_ptr.h:292:7: note: candidate: std::shared_ptr<_Tp>& std::shared_ptr<_Tp>::operator=(std::shared_ptr<_Tp>&&) [with _Tp = ouzel::graphics::Texture]
       operator=(shared_ptr&& __r) noexcept
       ^
c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/shared_ptr.h:292:7: note:   no known conversion for argument 1 from 'ouzel::graphics::Texture*' to 'std::shared_ptr<ouzel::graphics::Texture>&&'
c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/shared_ptr.h:300:2: note: candidate: template<class _Tp1> std::shared_ptr<_Tp>& std::shared_ptr<_Tp>::operator=(std::shared_ptr<_Tp1>&&) [with _Tp1 = _Tp1; _Tp = ouzel::graphics::Texture]
  operator=(shared_ptr<_Tp1>&& __r) noexcept
  ^
c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/shared_ptr.h:300:2: note:   template argument deduction/substitution failed:
src/sgs_ouzel.cpp:625:13: note:   mismatched types 'std::shared_ptr<_Tp1>' and 'ouzel::graphics::Texture*'
  h->texture = new Texture;
             ^
In file included from c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/memory:82:0,
                 from ouzel/ouzel/animators/Animator.hpp:6,
                 from ouzel/ouzel/ouzel.hpp:6,
                 from src/sgs_ouzel.hpp:9,
                 from src/sgs_ouzel.cpp:3:
c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/shared_ptr.h:308:2: note: candidate: template<class _Tp1, class _Del> std::shared_ptr<_Tp>& std::shared_ptr<_Tp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Tp1 = _Tp1; _Del = _Del; _Tp = ouzel::graphics::Texture]
  operator=(std::unique_ptr<_Tp1, _Del>&& __r)
  ^
c:/tdm-gcc-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/shared_ptr.h:308:2: note:   template argument deduction/substitution failed:
src/sgs_ouzel.cpp:625:13: note:   mismatched types 'std::unique_ptr<_Tp, _Dp>' and 'ouzel::graphics::Texture*'
  h->texture = new Texture;
             ^

Comments