build: remove explicit constexpr instantiations

GCC7 no longer requires these instantiations, and in fact produces a
warning/error in these cases. So we remove them.
This commit is contained in:
Danny Robson 2017-06-08 15:48:15 +10:00
parent 2a69ccb571
commit a59f6ffc69
4 changed files with 5 additions and 50 deletions

View File

@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright 2010-2016 Danny Robson <danny@nerdcruft.net>
* Copyright 2010-2017 Danny Robson <danny@nerdcruft.net>
*/
#include "./colour.hpp"
@ -441,17 +441,6 @@ util::operator>> (std::istream &is, util::colour<S,T> &c)
template std::istream& util::operator>> (std::istream&, util::colour<3,uint8_t>&);
///////////////////////////////////////////////////////////////////////////////
// we need to instantiate the various type_name specialisations for colour.
//
// we provide a declaration here, before then instantiating a routine that we
// know will cause an implicit instantiation (ie util::to_string) for each
// colour specialisation we require.
template <size_t S, typename T>
constexpr
const char util::type_name<colour<S,T>>::value[];
//-----------------------------------------------------------------------------
#define INSTANTIATE_S_T(S,T) \
template \
struct util::colour<S,T>; \

View File

@ -11,32 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright 2015-2016 Danny Robson <danny@nerdcruft.net>
* Copyright 2017 Danny Robson <danny@nerdcruft.net>
*/
#include "introspection.hpp"
///////////////////////////////////////////////////////////////////////////////
constexpr const char ::util::detail::type_name_bool::value[];
constexpr const char ::util::detail::type_name_char::value[];
constexpr const char ::util::detail::type_name_voidp::value[];
constexpr const char ::util::detail::type_name_u08::value[];
constexpr const char ::util::detail::type_name_u16::value[];
constexpr const char ::util::detail::type_name_u32::value[];
constexpr const char ::util::detail::type_name_u64::value[];
constexpr const char ::util::detail::type_name_s08::value[];
constexpr const char ::util::detail::type_name_s16::value[];
constexpr const char ::util::detail::type_name_s32::value[];
constexpr const char ::util::detail::type_name_s64::value[];
constexpr const char ::util::detail::type_name_f32::value[];
constexpr const char ::util::detail::type_name_f64::value[];
constexpr const char ::util::detail::type_name_string::value[];
constexpr const char ::util::detail::type_name_cstring::value[];
constexpr const char ::util::detail::type_name_const_cstring::value[];
constexpr const char ::util::detail::type_name_path::value[];

View File

@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright 2015-2016 Danny Robson <danny@nerdcruft.net>
* Copyright 2015-2017 Danny Robson <danny@nerdcruft.net>
*/
#ifndef __UTIL_INTROSPECTION_HPP
@ -173,13 +173,7 @@ namespace util {
util::enum_traits<::NS::E>::value_count \
> PASTE(util::__enum_traits_,E)::names = { \
MAP(STRINGIZE_LIST, __VA_ARGS__) \
}; \
\
constexpr \
const char util::type_name<::NS::E>::ns[]; \
\
constexpr \
const char util::type_name<::NS::E>::value[]; \
};
///------------------------------------------------------------------------

View File

@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright 2016 Danny Robson <danny@nerdcruft.net>
* Copyright 2016-2017 Danny Robson <danny@nerdcruft.net>
*/
#include "./term.hpp"
@ -24,11 +24,8 @@
using util::term::csi::graphics;
static const std::experimental::filesystem::path DEFAULT_SEARCH_DIR = "/usr/share/terminfo";
constexpr char util::term::csi::code::CSI;
const graphics graphics::RESET (0);