Commit graph

3869 commits

Author SHA1 Message Date
41ad41d1f1 clean-up: sourcefile layout and spell checking
Uniform sequence at start of source files
- copyright claim
- license
- file comment
- header guard
- lumiera includes
- library / system includes

Lumiera uses Brittish spelling. Add an according note to the styleguide.
2014-10-23 23:04:35 +02:00
3dccb77245 clean-up: use dashes in filenames 2014-10-23 23:04:33 +02:00
5e9182b29c fix links in the "Statistics" page. Ohloh is now called OpenHub 2014-10-02 23:02:21 +02:00
e8657423a8 sync documentation and code trees 2014-10-02 04:10:51 +02:00
073efdf6a4 DOC: extend the description of dependency pitfals and intricasies
Still not complete, but a complete outline now
2014-10-02 04:08:26 +02:00
b5de8523b1 DOC: start a page to describe linking dependency intricasies 2014-10-01 04:07:18 +02:00
aaaad8d70f DOC: some clean-up in the page describing the build system 2014-10-01 01:19:56 +02:00
c14bb61e6a fix for resolution of transitive dependencies between "Lumiera modules"
This is a somewhat intricate problem. As long as we linked with --no-as-needed,
these problems could not manifest themselves, since all dependencies are spotted
correctly by SCons and thus added as direct children of the executable.

But when we switch to --as-needed linking, the linker will omit some of
the dependencies given from the build system, when the code to be linked
doesn't call directly into these dependencies. But of course dynamic modules
may depend on each other, and indeed, the Lumiera libs do so. Thus
the linker may omit the dependency to liblumierasupport, and just add
a dependency to, say liblumierabackend. But the backend in turn
depends on the support library.

Now the problem is, that when resolving several steps deep into such
a dependency chain, our special relative path resolution scheme fails.
The fix is to give each lumiera module itself another relative path
resolution spec, which overrides at that point the root spec given
for the executable. Thus, we define

- for the executable: "search at $ORIGIN/modules"
- for the modules:    "search at $ORIGIN/../modules"

This accounts for the fact, that a module, which is the Origin
for a transitive resolution step, already sits in a subdirectory
below the executable; thus step one level up and devle down into
the hard wired modules directory. Alternatively, we could also
use just "search at $ORIGIN" (i.e. in the same directory).
But assuming that in future we'll roll several core plugins,
which also count as "Lumiera modules", the scheme defined here
is more flexible, since it allows to place those core plugins
into sibling directories.
2014-10-01 00:21:47 +02:00
4e5b1901a1 Solution for #948 : special treatment for the test-suite
Note: this changeset globally sets the linkerflag --as-needed
but adds a single, hard coded exception to this rule for
taget/test-suite
2014-09-30 04:40:24 +02:00
Ichthyostega
9945351ab2 Jessie(#946) & Clang(#928) compatibility: fix too narrow test definition
Clang evaluates expressions in different order. While in GCC, the exception
happens at the begin, in Clang the first terms have been already printed.
2014-09-26 02:36:36 +02:00
Ichthyostega
f1a6fca4cd fix too narrow test definition for IterAdapterSTL_test
here we're iterating hash table based collections, consequently
the order of items retrieved *is* implementation dependent and indeed
differs on different platforms and compilers.
2014-09-26 02:24:01 +02:00
0eda9ff69c DOC: guidelines regarding c++11 move semantics 2014-09-25 21:23:19 +02:00
7492e7ffce Fix initialisation order problem, triggered in Clang (#928)
In Clang, static object fields are initialised from top to bottom,
but before any other variables in anoymous namespaces. To the contrary,
GCC evaluates *any* initialisation expression in the translation
unit together from top to bottom. Thus, in the clang generated
code, in two cases the static initialisation could use a not yet
constructed local lib::_Fmt formatter object.
2014-09-25 02:50:02 +02:00
30686fdf82 fix argument passing for MultiFact(#388)
as always, it turned out that the alledged "compiler bug"
rather was my own sloppyness: I forgot properly to undo a change
I made while fighting with compilation problems: the wrapper in
the factory didn't use std::forward, resulting in a plain flat
slicing copy. This, rightfully, triggered the assertion in the
session query resolver (since a sliced Goal can not be dynamic cast
to a specific Query subclass).
2014-09-23 03:37:28 +02:00
059dbd8c75 fix and finish the diagnostics helper
there was still a subtle bug in this helper.
testing your own test fixture is sometimes a good idea ;-)
2014-09-23 03:37:28 +02:00
4145452397 factor out a diagnostics helper for variadic templates
a nice offspring of this investigation
2014-09-22 03:37:07 +02:00
6fa8b41e1d Research: gotcha!
the alledged compiler error turned out to be
just plain flat lack of attention on my side.

I forgot to revert an previous experimental change:
The "wrapper" in the factory takes the argument by-value
(I forgot to add he && back in, which I removed while
fighting with other compilation problems)
2014-09-22 01:16:46 +02:00
e676eb6da8 Research: extend to variadic template calls
also improve the diagnostics to show pass-by LRef or RRef

but unfortunately not able to reproduce the problematic case yet
2014-09-21 19:26:35 +02:00
264b7e8e0f Research: corner cases of "perfect forwarding" 2014-09-21 02:54:54 +02:00
9dfd3fc981 phase out some use of auto_ptr
TODO: the toolfactory needs a redesign anyway,
this was just placeholder code added in a very early
state of the Lumiera project. We have way better memory
managing facilities at hand now
2014-09-15 02:03:10 +02:00
d064623bab Reworked MultiFact(#388): switch in the new implementation 2014-09-14 23:58:05 +02:00
9a5d9873c8 WIP: prepare switch to the reworked MultiFac implementation #388 2014-09-14 22:38:58 +02:00
591e6d9775 MultiFact: implement the last and most complex usage case
the use of a custom finisihing functor, which is applied
to any generated product. This can be used for registration,
memory management or similar framework aspects
2014-09-14 22:25:12 +02:00
932d49fd95 MultiFact: how I learned to love the Bomb
C++11 is just incredibly cool. It is so easy to
support a flexible yet specific set of arguments
2014-09-14 02:06:58 +02:00
372edbfc85 MultiFact: implement second use case (smart pointers) 2014-09-14 00:36:36 +02:00
177eb0fab3 DOC: notes regarding the current level of C++11 support 2014-09-13 04:55:57 +02:00
0ff5c50030 MultiFact: implement simple usage pattern. NOTE: breaks CLang 3.0
Implement the first simple usage scenario for the
unified MultiFact template, using variadic templates.

NOTE:
 - the obvious solution based on std::forward
   triggers strange behaviour in GCC-4.7
 - the inline lambda in the test case traps the
   CLang-3.0 parster with a segfault. Horay!
2014-09-13 02:50:14 +02:00
c209f2e80c WIP: draft first usage pattern of the reworked MultiFact
...this time, I am determined to get it all into a single
template, and get it clear and right.
2014-09-11 19:39:42 +02:00
a1bb9178f5 Ticket #388: start investigation of MultiFact design
needs overhaul, since current design leads to problems
with GCC 4.8 onwards (and is messed up anyway)
2014-09-11 00:10:59 +02:00
b2b75fbe43 attempt to make factory invocation more evident in the code
...but the whole design looks still overengineered. See #388

- should get rid of the explicit specialisation
- always use a function signature and thus have arguments?
- why inheriting from the wrapper?
2014-09-08 03:37:41 +02:00
21079f3145 re-reading and rewording comments
still puzzled why this instantiation of MultiFact fails to compile with GCC 4.8

so I'm bound to understand why the types involved
need indeed to be are structured the way they are right now.
2014-09-08 02:52:38 +02:00
be59e8c2e0 DOC: mark this RfC as dropped -- it was never implemented this way 2014-09-08 02:46:46 +02:00
a034c8be18 fix typo on RfC name
...spotted by looking into the Apache logs on www.lumiera.org
2014-09-08 01:29:48 +02:00
d2193e381c CLang-compatibility: temporary fix for bool conversion
...but we really neeed to re-think those bollean evaluations and conversions
2014-08-28 23:28:39 +02:00
7faa2e784d CLang-Compatibility: zero argument ctor now treated as function definition
previous versions used to resolve this ambiguity in favour of a ctor call,
but now the compiler treats such constructs as function definition;
this is reasonable, since C++11 introduced the notion of a "generalised
initialisation", which is always written as a (possibly empty) list
in braces.

In these specific cases here, we just omit the empty parens
2014-08-26 03:31:03 +02:00
685f4327f5 Fix: remove explicitly given hash function, use the automatic bridge instead
Since we have now a generic bridge to supply std::hash functions based on
an exisiting boost::hash function, we removed the explicit std::hash
specialisation for "Placement-ID".

This caused the PlacementIndex implementation to fail at compilation
with a quite obscure error, which in fact seems to be caused by the
absence of any specific specialisation. The symptom is that a iterator
range could not be assigned to the predefined iterator type of
std::unordered_multimap, due to a mismatch in the embedded traits type

__umap_traits<__cache_default<_Key, _Hash>::value>>

While I didn't track down that problem entirely, to verify my hypothesis,
the problem can be avoided by using the default -- which is now to
pick up an existing boost::hash function for this type and use this
to generate the std::hash function.
2014-08-26 03:04:14 +02:00
d07bbadaaf extend the unit-test to verify usage in hashtables 2014-08-18 06:03:41 +02:00
05042d96cd document the hash bridge with a unit test 2014-08-17 08:39:46 +02:00
e35a45a65e 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.
2014-08-17 08:03:21 +02:00
9a95beda32 Library: automatic bridge to use boost::hash functions for std::hash
NOTE: this header contains a potentially dangerous, temporary workaround
to defeat the static assertion in the default implementation of std::hash,
as shipped with GCC 4.7.x

This assertion turns out to be detrimental all kinds of metaprogramming
based solutions, since it defeats SFINAE. It is expected to be removed
in GCC 4.8
2014-08-17 07:15:47 +02:00
f02481bb90 fix include order in GUI headers
the rules are:
- our own headers go before any library headers
- all headers need to be spelled relative to include root
- ensure that gtk is always included via gui/gtk-base.hpp
2014-08-17 07:02:48 +02:00
f00450a06c ..and use this trait to build an automatic bridge from boost::hash to std::hash
this completes the exploration; we should now be able to use
any type with boost hash support in the std unordered containers
without much ado.

I wasn't able to come up with a completely modular solution, since
the std::hash template has only one template parameter, which
defeats using enable_if. But since we're controling the default
implementation after the Hijacking anyway, we can as well go
ahead directly to forward to an existing boost::hash function
2014-08-17 03:23:35 +02:00
60b40de3d8 construct a trait to detect boost hash compatibility
this turns out to be quite tough, since boost::hash
just requires a free function 'hash_value' to be
"somehow" present, which might be just through ADL.

My solution is to inject an fallback declaration of such a function,
but only in the namespace where the trait template is defined.
Hopefully this never interferes with real hash functions defined
for use by boost::hash
2014-08-16 04:54:31 +02:00
7391d02c35 investigate the hijacking trick proposed by "enobayram"
...push away the definition from the standard library
and plant our own definition instead -- with a marker
typedef for metaprogramming
2014-08-16 02:04:29 +02:00
79b19b270f DOC: add a page with notes on the IDE setup 2014-08-16 00:03:55 +02:00
50faee12b3 DOC: update the Boost-page to reflect what's part of the language now
several C++11 features used to be Boost features in the past
2014-08-16 00:03:32 +02:00
e205e1e1a0 investigation of hash function extension points (#722)
start a systematic research about the coexistence of
std::hash and boost::hash. The goal is to build an
automatic bridge function -- but this is hampered by
the unfortunate standard implementation of std::hash

Since meanwhile even the GCC people seem to have realized
this wasn't a good idea, I am geared towards using a hack
to work around this problem, which can be expected to go
away with GCC 4.8.x

A possible idea how to construct such a workaround is
http://stackoverflow.com/questions/12753997/check-if-type-is-hashable


I start this investigation by defining two custom types,
each with his own extension point for hashing. The goal
would then be to use both in a standard hashtable container.
2014-08-13 04:18:38 +02:00
faf62cf8af DOC: start a page with C++11 notes (here: about type conversion)
note down some results found out during the C++11 transition.
There is now a clear distinction between automatic type conversion
and the ability to construct a new instance
2014-08-13 03:08:00 +02:00
3ef6bb0482 improve readability of some test specs
..by using literal match instead of regular expression match
2014-05-12 01:37:15 +02:00
561e036e0b remove any remaining use of boost::lambda
obsolete now, we can use the lambdas of the stock language
2014-05-12 01:12:45 +02:00