Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Xeverous

Pages: [1]
1
Pretty much in the title

Currently such code does not compile:
constexpr sf::Vector2u tile_size{64, 64};

GCC 5.1 output: (-std=c++14)
In file included from ../src/Application.cpp:4:0:
../src/Global.h:25:40: error: the type 'const Vector2u {aka const sf::Vector2<unsigned int>}' of constexpr variable 'constants::tile_size' is not literal
 constexpr sf::Vector2u tile_size{64, 64};
                                        ^
In file included from D:\Files\C++\include/SFML/Graphics/Rect.hpp:31:0,
                 from D:\Files\C++\include/SFGUI/Widget.hpp:5,
                 from D:\Files\C++\include/SFGUI/Container.hpp:3,
                 from D:\Files\C++\include/SFGUI/Bin.hpp:3,
                 from D:\Files\C++\include/SFGUI/Alignment.hpp:3,
                 from D:\Files\C++\include/SFGUI/Widgets.hpp:7,
                 from ../src/UserInterface.h:5,
                 from ../src/Application.h:3,
                 from ../src/Application.cpp:3:
D:\Files\C++\include/SFML/System/Vector2.hpp:37:7: note: 'sf::Vector2<unsigned int>' is not literal because:
 class Vector2
       ^
D:\Files\C++\include/SFML/System/Vector2.hpp:37:7: note:   'sf::Vector2<unsigned int>' is not an aggregate, does not have a trivial default constructor, and has no constexpr constructor that is not a copy or move constructor

It would be a convenient feature, and it's probably easy to implement

Pages: [1]