Commit graph

3830 commits

Author SHA1 Message Date
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
c2ea15695e amend harmless PlacementIndex test failures. Test Suite PASS
c++11 uses another hashtable implementation.
This uncovered some poorly written tests, which relied on
objects being returned in a specific order. As far as poissible,
we're using generic query functions now to get our test objects.

But these tests still rely on a specifically crafted test index content,
which as such is acceptable IMHO. The only remaining problem is
that we check the order of generated output in some tests, and this
order is still implementation dependent.
2014-05-11 02:08:53 +02:00
a421cf45de adjust test spec: C++11 does indeed pass ref parameters even through function objects
This is a notable difference to the boost or tr1-function objects
we used up to now. Thus the behavour is now straight forward without
any exception. If the function takes an argument by reference,
this is replicated through bind and function expressions
2014-05-10 02:14:38 +02:00
4acb7de682 half hearted fix: order of hashmap entries is implementation dependent
a real fix would be to rewrite the test to collect the retrieved
values and do a structural verification of the results. This
would mean to write a lot of code for such a marginal topic,
which was implemented just for sake of completenes anyway.

Hopefully my lack of "motivation" doesn't backfire eventually ;-)
2014-05-09 01:45:10 +02:00
a205653cad C++ uses a more precise meaning of 'convertiblity' now
Conversion means automatic conversion. In our case,
what we need ist the ability to *construct* a bool from
our (function) object -- while functors aren't automatically
convertible to bool. Thus we use one of the new predicates
from <type_traits>
2014-05-09 00:56:31 +02:00
643dfe3ea8 fix long standing error in testsuite runner
...uncovered by switching to c++11
When invoking an individual test, we used to erase
the 0-th cmdline argument, which happens to be allways
the name of the test being invoked. Yet none of our
tests actually complied to that contract. Rather,
all tests taking arguments access them by 1-based
argument index. Previously, the argument values just
happened to be still in memory at the original location
after erasing the 0st element.

"Fixed" that by changing the contract. Now, the 0th argument
remains in place, but when there are no additional arguments,
the whole cmdline is cleared.
This is messy, but the test runer needs to be rewritten
entirely, the whole API is clumsy and dangerous. Ticket #289
2014-05-09 00:56:31 +02:00
a4c41d1c12 testrunner: handle help request properly
don't actually execute the tests when there was a --help
2014-05-05 22:59:23 +02:00
027386d76c DOC: Tighten the build requirements to C++11 and Boost-1.55 2014-04-29 09:51:00 +02:00
361a78c478 Scons: check for C++11 specific headers. Be more explicit w/r boost
we still don't check for the precise boost version number in the
SCons configuration. We might do so in future, but for now our
policy is that precise version dependency checking is the business
of the packager (i.e. the debian package). The SCons build just
has to ensure the absolute necessary baseline
2014-04-29 09:24:18 +02:00
f826ab1ee5 C++11 transition: get compilation to pass again
...but we have still 12 test failures
2014-04-28 01:34:03 +02:00
2e9467fe76 Ticket #942: introduce move semantics for our custom shared-ptr-wrapper lib::P 2014-04-28 01:06:40 +02:00
f28ad3cf74 Ticket #940: solution for binding GUI signals
* use a development snapshot of lib SigC including the recent C++11 adaptations
 * never include whole namespaces. Here we got a clash between std::bind and sigc::bind
 * use lambdas
   * to make the binding code more readable
   * to take the nested invocations apart, which resolves the return type ambiguity
2014-04-27 21:28:52 +02:00
761bab5647 C++11 transition fixes
- comparison of weak-pointers
2014-04-05 22:20:38 +02:00
bb5db0ebd5 minor improvement to the GUI-model Sequence
including a LUID based hash identity
2014-04-05 22:18:37 +02:00
44970ed96e unsuccessful attempt to bridge between std::hash and boost::hash_value (Ticket #722) 2014-04-03 22:43:35 +02:00
7be1b7d35d Switch from TR1 preveiw to the new standard headers
- functional
- memory
- unordered collections
2014-04-03 22:42:48 +02:00
3fa9830f4c Switch compilation to C++11 standard with GNU extensions
Why GNU extensions? They where on by default previously,
so we're changing nothing besides the C++ standard level.

AFAIK, we're using a GNU extension at one place, and this
could be replaced by 'decltype' now.
2014-03-17 02:41:31 +01:00
5be52d4a55 Ticket #925: remove LUID from interface/plugin specifications
In the November developer meeting, Christian and I agreed that
it's best to remove that offending LUID specifications altogether.

Those embedded LUIDs where one of the issues blocking the transition to C++11
2014-03-16 02:21:07 +01:00
5fa4667fb8 fix error in test fixture
random offset should always be != zero
2014-03-16 02:00:01 +01:00
7c3efb309a explain the term 'subsystem' 2014-02-16 22:03:47 +01:00
5d835c71f3 TiddlyWiki: fix some orphaned pages
...caused by image names starting with upper case letter
2014-02-16 22:02:55 +01:00
4ef1883c04 settle and implement some long standing concerns regarding #920
- what the dispatch operation actally is
- where the deadlines are established
2013-11-18 02:25:27 +01:00
a640283e4c introduce typedef for Frame numbers (see #882) 2013-11-18 00:01:43 +01:00
608ae3efd8 continue development where we left before the release effort 2013-11-17 23:05:15 +01:00
62ae422fcc bugfix: occasional wrap-around on 32bit FSecs value in test code
this is rather a workaround.
The problem is a wraparound while calculating the common denominator in

Time rawTime (dirt + frames*F25);

Currently we're using boost_rational<long>, and long is only 32bit
on 32bit platforms. The workaround commited here just avoids
the calculation of the fractional value, and adds 64bit time values
instead. But the real solution would be to use a consistent
approach for dealing with frame counts and frame rates, all
based on 64bit values. See Ticket #939
2013-11-10 04:17:53 +01:00
4da923696b partial fix: use 64 framecounts (Ticket #882)
This is a partial and preliminary fix; we had an occasional
numeric overflow on 32bit platforms in some tests.

The complete fix will be to introduce a typedef and then
rework the relevant APIs (which are preliminary anyway,
thus no urge right now)
2013-11-10 04:14:39 +01:00
3ffc27eee0 bugfix: format-string for long and ulong values
our front-end for boost::format, the class lib::_Fmt
was lacking an reliable  specialisation for long and ulong.

This is due to the notorious problem of these types being
of platform dependant size. As a fix, we're speclialising
explicitly for int16_t, int32_t and int64_t and avoid the
common names 'short', 'int' and 'long' alltogether.

And especially for non-64bit-platform (NONPORTABLE)
we add an explicit specialisation for long
2013-11-10 04:14:22 +01:00
1e04ee16ea Build: always link explicitly agrainst lib rt
This improves sane library dependencies, as mandated
by debian policy. Some of the librt functions are in such
wide use, that we'd get them through transitive dependencies
anyway. But linking explicitly against a function adds the
DT_NEEDED for this library to our build artefacts. This is
correct, since we're actually using these functions ourselves,
making them into direct dependencies.
2013-11-09 00:08:48 +01:00
8defe47507 Debian/Policy 3.9.x : enforce strict dependencies on dynamic modules
The recommendation is to use the link flag --no-undefined
and to fed *all* dependencies to the respective link step.

This changeset enables this strict linking of dependencies.
It turned out that our dependencies were already sane
(with the sole exception of a direct dependency to X-Lib
in the XV viewer widget)
2013-11-03 00:07:17 +01:00
e7769b4bbf Build: make dependency on X-Lib explicit
The XV-Viewer widget in our GUI uses four direct calls
to the X-Lib. This was discovered by strict dependency checking,
as mandated by new Debian policy
2013-11-03 00:07:07 +01:00
c7d6ab423f SCons: ability to define additional libraries in a flexible way 2013-11-03 00:06:59 +01:00
c848903fea Pre-release 0.pre.02
This is a development snaphot pre release of Lumiera.
Update README, AUTHORS, LICENSE and similar release docs.
2013-10-30 02:35:20 +01:00
0c55da28af release prep: bump version number
...this will be the second preview release
Lumiera is still in pre-alpha stage, and thus there
are no proper releases, just preview snapshots
from time to time.

But we're providing Debian packages allready
2013-10-29 06:13:55 +01:00
2cfc7030c0 release prep: clean-up obsolete information 2013-10-29 06:11:18 +01:00
888099466f release prep: remove defunct autotools buildsystem 2013-10-29 03:47:50 +01:00
d15ec47f9e DOC: some further round-up and polishsing 2013-10-28 06:14:42 +01:00
2c4ed4ca91 DOC: update and polish the building tutorial 2013-10-28 00:19:03 +01:00
9652c7ec5e Debian/Repo: reorganise the Git repository URLs
all debian package repositories are now located below
git://lumiera.org/debian/...
2013-10-27 10:18:38 +01:00
8b088d201e DOC: complete the "Contributing" tutorial with some proposed tasks to work on 2013-10-27 08:42:46 +01:00
39230436a3 DOC: slightly shorten and re-structure the "Contributing" tutorial
- prefer lower headline levels, more structuring
- turn some headlines into bullet lists
- cross-link to the "Building Lumiera" tutorial
2013-10-27 08:41:40 +01:00