tricky header reordering to support a hackish-workaround (#944)

right now we have to defeat an unfortunate static assertion in
the standard library, which is expected to go away in the future.
We use a hack to hijack the problematic definition with the preprocessor,
which requires our header to be first.
This commit is contained in:
Fischlurch 2014-08-17 08:03:21 +02:00
parent 9a95beda32
commit e35a45a65e
16 changed files with 23 additions and 37 deletions

View file

@ -21,10 +21,9 @@
* *****************************************************/
#include "common/option.hpp"
#include "lib/error.hpp"
#include "lib/util.hpp"
#include "common/option.hpp"

View file

@ -40,6 +40,7 @@
#define GUI_GTK_BASE_H
//--------------------tricky special Include sequence
#include "lib/hash-standard.hpp"
#include <locale>
#include <gtkmm.h>
#include <nobug.h>

View file

@ -45,9 +45,12 @@
** @see gui::GtkLumiera#main the GTK GUI main
*/
//--------------------tricky special Include sequence
#include "lib/hash-standard.hpp"// need to be before any inclusion of <string>
#include <locale> // need to include this to prevent errors when libintl.h defines textdomain (because gtk-lumiera removes the def when ENABLE_NLS isn't defined)
#include "gui/gtk-lumiera.hpp" // need to include this before nobugcfg.h, because types.h from GTK tries to shaddow the ERROR macro from windows, which kills nobug's ERROR macro
//--------------------tricky special Include sequence
#include "lib/error.hpp"
#include "gui/guifacade.hpp"

View file

@ -47,15 +47,15 @@
#ifndef LIB_ALLOCATION_CLUSTER_H
#define LIB_ALLOCATION_CLUSTER_H
#include <vector>
#include <boost/scoped_ptr.hpp>
#include <boost/noncopyable.hpp>
#include "lib/error.hpp"
#include "lib/sync-classlock.hpp"
#include "lib/scoped-holder.hpp"
#include "lib/scoped-holder-transfer.hpp"
#include <boost/scoped_ptr.hpp>
#include <boost/noncopyable.hpp>
#include <vector>
namespace lib {

View file

@ -22,9 +22,9 @@
#include "lib/cmdline.hpp"
#include "lib/util.hpp"
#include "include/logging.h"
#include "lib/cmdline.hpp"
#include <boost/regex.hpp>
#include <boost/algorithm/string/join.hpp>

View file

@ -39,11 +39,10 @@
#ifndef LUMIERA_ERROR_HPP_
#define LUMIERA_ERROR_HPP_
#include <string>
#include "include/logging.h"
#include "include/lifecycle.h"
#include "lib/error.h"
#include <string>
namespace lumiera {

View file

@ -209,24 +209,4 @@ namespace lib {
} // namespace lib
/////////////////////////////////////////////////////////////////////////TICKET #722 : should provide a generic bridge to use hash_value
// The following doesn't work as expected, probably because of sub type relationship not being detected when picking a template specialisation
// see also hash-standard.hpp
//namespace std {
//
// template<typename BA, typename IMP>
// struct hash<lib::HashIndexed<BA,IMP> >
// {
// size_t
// operator() (lib::HashIndexed<BA,IMP> const& val) const noexcept
// {
// return hash_value(val);
// }
// };
//
//}
#endif

View file

@ -41,6 +41,7 @@
#ifndef LIB_SYMBOL_H
#define LIB_SYMBOL_H
#include "lib/hash-standard.hpp"
#include <string>
#include <cstring>

View file

@ -23,10 +23,11 @@
#include "include/logging.h"
#include "lib/cmdline.hpp"
#include "lib/hash-standard.hpp"
#include "lib/test/test-helper.hpp"
#include "lib/test/suite.hpp"
#include "lib/test/run.hpp"
#include "lib/cmdline.hpp"
#include "lib/error.hpp"
#include "lib/util.hpp"

View file

@ -21,10 +21,10 @@
* *****************************************************/
#include "lib/error.hpp"
#include "lib/test/testoption.hpp"
#include "lib/test/suite.hpp"
#include "lib/error.hpp"

View file

@ -25,6 +25,7 @@
#define LIB_UTIL_H
#include "include/limits.h"
#include "lib/hash-standard.hpp"
#include <set>
#include <string>

View file

@ -25,6 +25,7 @@
#define PROC_ASSET_CATEGORY_H
#include "lib/symbol.hpp"
#include "lib/hash-standard.hpp"
#include <string>
#include <boost/functional/hash.hpp>

View file

@ -26,6 +26,7 @@
//#include "proc/engine/procnode.hpp" /////TODO can we get rid of this header here?
//#include "common/query.hpp"
#include "lib/hash-standard.hpp"
#include <boost/scoped_ptr.hpp>
#include <vector>

View file

@ -24,11 +24,9 @@
#ifndef PROC_MOBJECT_SESSION_ALLOCATION_H
#define PROC_MOBJECT_SESSION_ALLOCATION_H
#include <string>
#include "proc/mobject/session/locatingpin.hpp"
#include <string>
using std::string;

View file

@ -21,11 +21,12 @@
* *****************************************************/
#include <iostream>
#include "lib/test/run.hpp"
#include "lib/test/testoption.hpp"
#include "lib/util.hpp"
#include <iostream>
using lib::Cmdline;
using util::isnil;
using std::endl;

View file

@ -21,9 +21,9 @@
*/
#include "lib/test/suite.hpp"
#include "lib/test/testoption.hpp"
#include "include/lifecycle.h"
#include "lib/test/testoption.hpp"
#include "lib/test/suite.hpp"
using lumiera::LifecycleHook;
using lumiera::ON_GLOBAL_INIT;