Comments (5)
Quick question: Are you compiling develop or master? Short answer is that I believe this has been fixed on develop and I can port that to master. Long answer, this arises from a bug with alias templates in GCC that was resolved between GCC 4.8 and GCC 4.9 and above. Consider the program:
#include <iostream>
#include <typeinfo>
#include <cstdlib>
template <typename U,template <typename> class T>
struct foo{
static void print() {
std::cerr << "Undefined for type: "<< typeid(T <U>).name()
<< std::endl;
exit(EXIT_FAILURE);
}
};
// Create a dummy templated class
template <typename T>
struct bar {};
// Create a template alias based on this class
template <typename T> using bar_alias = bar <T>;
template <typename T>
struct foo <T,bar> {
static void print() {
std::cout << "This is bar" << std::endl;
}
};
int main() {
foo <double,bar>::print();
foo <double,bar_alias>::print();
}
In GCC 4.9, this produces:
$ ./alias_template
This is bar
This is bar
In GCC 4.8 this produces:
$ ./alias_template
This is bar
Undefined for type: 3barIdE
Anyway, the result from GCC 4.9 and later is the correct result. Prior to my use of newer versions of GCC, I didn't know this was the case and I used an old work around that was incorrect, which I'm pretty sure is what the error above is. Technically, that code I attached is something slightly different, but I believe it to be a manifestation of the same bug.
I do have a fix and I can back port it into master. That being said, my preference would be to just fix up a couple of existing documentation issues and then do a new release, which would also fix things. In the immediate future:
- You can compile without unit tests and it should work
- Please verify this is on master and not develop
By the way, develop is now using C++14, so your CMake options will need to change slightly. In terms of when there's a new release, I do intend to do so soon. I could probably do that this week.
from optizelle.
I was compiling master, sorry I forgot to specify, and thank you for your detailed explanation. You know you are doing fancy stuff when you start hitting compiler bugs... Indeed, disabling the unit tests works on master.
On a side note: in both master and develop I had to manually set the C++ flavour flag, shouldn't they be there by default? I have the environment variable $CCFLAGS set to my architecture, and Cmake is picking it up, which is nice, but I wonder if it is overriding the setting.
I am not planning to use it in the immediate future, so I can wait for the new release. Also, I can test it in my boxes to make sure it runs smoothly before the release.
from optizelle.
Sounds great. I'm grinding through some code at the moment, but I'll send a message by in the next few days.
from optizelle.
Good call on the autodetect C++ versions. I updated the CMake scripts to auto set the C++14 compiler flags in commit 37bf35d. It looks like this came out with CMake 3.1 and I updated all of the required versions accordingly.
I'll wait to close this issue out when everything is pushed to master.
from optizelle.
I'm going to close this out since the issue was fixed and open a new ticket with the list of things I need to do before pushing everything to master. Mostly, I'm trying to stay organized.
from optizelle.
Related Issues (20)
- Clean up messages for the algebra diagnostics HOT 1
- Add documentation to the vector space algebra tests HOT 1
- Clean up messages for the Lagrangian diagnostics HOT 1
- Add documentation for the Lagrangian diagnostics HOT 1
- Documentation link on webpage is broken HOT 2
- Increase trust-region when the quasinormal step hits the boundary HOT 1
- CCmake is picking up Python3 HOT 2
- Build failure: ‘const class Json::Value’ has no member named ‘isUInt64’ HOT 3
- Add unit tests for when the CG objective in truncated CG goes up HOT 1
- Add unit test to check exit when Cauchy point brings us to optimality HOT 1
- Checklist before pushing to master and releasing v1.2 HOT 1
- CMake build scripts don't add dependency on supporting files when running unit tests
- Documentation not available HOT 2
- Better document that initial guesses must be strictly feasible with respect to the inequality
- Clarify documentation on how to parallelize the algorithm
- Clarify documentation on how to use preconditioner
- Python 3.x support ? HOT 17
- PyThreadState_Get: no current thread on MacOS HOT 2
- Any example for parallelizing with GPU? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from optizelle.