Hello all,
I am trying to include a C++ library with quite a few templates into an objective C application.
It seems to perpetually choke on a few inline statements inside a shared library:
template <class T>
inline T MIN(T a, T b) { return a > b ? b : a; }
template <class T>
inline T MAX(T a, T b) { return a > b ? a : b; }
yieldin...
After quite some time debugging my code, I tracked down the reason for my problems to some unexpected template specialization results using enable_if:
The following code fails the assertion in DoTest() in Visual Studio 2010 (and 2008), while it doesn't in g++ 3.4.5.
However, when i remove the template from SomeClass or move *my_conditio...
I've just begun using StringTemplate (from stringTemplate.org) and I'd like to know how to achieve grouping in the results.
e.g.
Month , ID
__________________
Jan ,1
Jan ,2
Feb ,3
Feb ,4
Feb ,5
Mar ,6
Mar ,7
Mar ,8
Mar ,9
so that the results when grouped by mon...
HI,
I stuggeling with the databinding with in a custom control
I've got some properties within my custom control.
public static DependencyProperty TitleProperty;
public static DependencyProperty PageDictionaryProperty;
public string Title
{
get
{
return (string)base.GetValue(TitleProperty);...
I have that template class that uses a policy for it's output and another template argument to determine the type for it's data members. Furthermore the constructor takes pointers to base classes which are stored in private pointers. Functions of this objects shall take a this pointer to the template class to give them access to the data...
#include <iostream>
template<typename T_function_type>
struct pointer_wrapper {
T_function_type function_pointer;
explicit pointer_wrapper(T_function_type ptr) : function_pointer(ptr) { }
~pointer_wrapper() { }
};
template<typename T_return, typename T_arg1, typename T_arg2>
pointer_wrapper<T_return (*)(T_arg1, T_arg2)>...
I have a number of departments that need to put forms online...I'm wondering if there is a way for me to allow them to do this dynamically - rather than me programming each form? It does need to flow into a database...I'm thinking something similar to Wufoo?
...
Hi,
I'm not getting the partial template specialization.
My class looks like this:
template<typename tVector, int A>
class DaubechiesWavelet : public AbstractWavelet<tVector> { // line 14
public:
static inline const tVector waveletCoeff() {
tVector result( 2*A );
tVector sc = scalingCoeff();
for(int i = 0; i < 2*A; ++i)...
Hello everyone,
I'm a pretty novice (C++) programmer and have just discovered the CRTP for keeping count of objects belonging to a particular class.
I implemented it like this:
template <typename T>
struct Counter
{
Counter();
virtual ~Counter();
static int count;
};
template <typename T> Counter<T>::Counter()
{
++...
Hello,
I've been having some difficulties with diagnosing a segmentation fault resulting from, or at least I think resulting from a template'd static class (see original post here http://stackoverflow.com/questions/3200360/help-understanding-segfault-with-stdmap-boostunordered-map).
Since posting that I found some other bizarre behavio...
I learned PHP by hacking away at phpBB2, even submitting a few mods to their database, which others downloaded and used. (I don't believe phpBB2 is supported any more with phpBB3 out so long now, so the v2 mods database is no more.)
One of my favorite things about phpBB was their templates system, which let the editor completely separat...
I tried installing via the interface but it said that the package i waas trying to install wasnt found.
I also tried puting the extracted folder in the templates/ folder but still nothing.
I tried reinstalling Joomla all over again but with no luck.
I am suspecting that the problem has something to do with mysql but i cannot confirm that...
why in the first line of this code:
template <typename VectorType>
std::string repr_vector_dynamic(const VectorType* vect)
{
std::stringstream strs;
strs << "(";
for (int i = 0; i < vect->size(); ++i) {
if (0 != i) {
strs << ", ";
}
strs << (*vect)[i];
}
strs << ")";
return str...
Hi guys! I am trying to define a window template that can be used by windows in other assemblies. I define a window template and store it in resource dictionary in some assembly. After, I use this template in other assembly on window definition in XAML. It looks that the template is accepted and I can see updated window in VS-2010 design...
Ok, I'm wondering if there are any iphone application templates that can send the mic input of the iphone wirelessly (wifi) to the computer. And then on the computer, there is another app the receives the mic input and makes it the audio input for the app. There is a decible meter on the mac app.
This is similar to the already existing ...
Compiling this code using g++ 4.2.1:
struct S { };
template<typename T> struct ST { };
template<typename BaseType>
class ref_count : private BaseType { };
template<typename RefCountType>
class rep_base : public RefCountType { };
class wrap_rep : public rep_base<ref_count<S> > {
typedef rep_base<ref_count<S> > base_type; // lin...
I'm loading tempo for Emacs:
(require 'tempo)
I can expand templates just fine, however not when the cursor is position on the beginning of the first line in the buffer.
I'm running Ubuntu with GNU Emacs 23.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.0)
of 2009-09-27 on crested, modified by Debian.
How can I use templates when t...
I'm looking for a good web framework for compositing multiple JSON sources fetched with HTTP requests in to static HTML. I am not looking to do this on the client-side (browser, javascript), I am looking for the best server-side solution.
So, what I need to do is:
Fetch several different JSON documents over HTTP
Format that JSON as HT...
I am developing an application that communicates via SMS. I want the user to be able to choose from a set of "Stock Messages" for example.
"I will be with you this morning"
"I can do this job next"
"I have arrived on site"
Is anyone aware of a list of this kind of template / stock message/ canned messages for use in a business cont...
For some reason, when I create a new view and select 'Create Strongly Typed View', when I try to select a view data class from my project I find that its not in the list?
Classes from all my project's references (external references) are there, but NONE of mine?
I know this can be done manually, but (bloody) visual studio wont allow me...