C++ error messages are _awful_, really. OT: I wish the language/compiler had a mode to declare certain classes and templates "opaque", where the compiler would only provide error messages up to the point where you interact with an object and not messages from inside it.
Alternatively I'd love a way to restrict types more. The Rust language has a way to specify all sorts of restrictions on template parameters via its "trait" system. For example, if you are making a container class, you can explicitly declare that its contained type must bear the "Sized" trait, and if you try to use a non-sized type the compiler will very clearly complain that you passed a non-sized type to a container requiring Sized. Hell, you could even provide an alternative implementation of the container for non-sized types that looks up the size dynamically at runtime and allocates storage on the heap. C++ needs this. On Tue, Mar 07, 2017 at 05:31:48PM +0100, Maciej Sumiński wrote: > I realize what was the problem. What I meant is the verbosity of the > error message that could be shortened to 'incomplete type information', > but perhaps a lengthy explanation is sometimes necessary. > > On 03/07/2017 05:26 PM, Chris Pavlina wrote: > > Lol, it's a pretty major thing if you look at what std::deque was trying > > to do...I don't see any way for the compiler to resolve this with the > > implementation of std::deque it was using ;) > > > > Thanks for the quick fix. > > > > On Tue, Mar 07, 2017 at 05:24:14PM +0100, Maciej Sumiński wrote: > >> Thank you Chris, now it should build fine on OSX as well. I really love > >> compilers screaming so much about such minor things. > >> > >> Regards, > >> Orson > >> > >> On 03/07/2017 04:51 PM, Chris Pavlina wrote: > >>> On Tue, Mar 07, 2017 at 04:35:44PM +0100, Maciej Sumiński wrote: > >>>> I use Linux+clang (3.9) and here the compiler does not complain. What is > >>>> the error message? > >>> > >>> Error dump attached. > >>> > >>>> Does it really build if you revert only this > >>>> particular commit? > >>> > >>> I also reverted the one directly after it because they looked connected. > >>> The build on macOS takes long enough that I didn't want to have to try > >>> twice. > >>> > >>>> > >>>> Cheers, > >>>> Orson > >>>> > >>>> On 03/07/2017 04:15 PM, Chris Pavlina wrote: > >>>>> Tested, works fine. > >>>>> > >>>>> By the way, the following commit breaks the build on macOS, and probably > >>>>> also Linux+clang. I had to revert it to get a successful build: > >>>>> > >>>>> commit d1550b0cdb990ba1f4f32220e110f8ff6331a5f1 > >>>>> Author: Maciej Suminski <maciej.sumin...@cern.ch> > >>>>> Date: Mon Mar 6 11:41:06 2017 +0100 > >>>>> > >>>>> Renamed VIEW_CONTROLS::SETTINGS to VC_SETTINGS. > >>>>> > >>>>> Because nested types cannot be forwarded. > >>>>> > >>>>> > >>>>> > >>>>> On Tue, Mar 07, 2017 at 09:40:04AM -0500, Wayne Stambaugh wrote: > >>>>>> I'm thinking a valid build and a quick check that the P&S router > >>>>>> doesn't > >>>>>> crash should be adequate. > >>>>>> > >>>>>> On 3/7/2017 9:32 AM, Chris Pavlina wrote: > >>>>>>> How thoroughly? I can build it on macOS and poke around a bit, but I > >>>>>>> don't have time to spend a day doing layout with it right now. > >>>>>>> > >>>>>>> > >>>>>>> On Tue, Mar 07, 2017 at 09:23:30AM -0500, Wayne Stambaugh wrote: > >>>>>>>> It needs to be tested on osx before we commit the patch. > >>>>>>>> > >>>>>>>> On 3/7/2017 9:24 AM, Maciej Sumiński wrote: > >>>>>>>>> Brief testing with Win7 x86_64 gives positive results. I really hope > >>>>>>>>> this is the end of the boost::context nightmare. > >>>>>>>>> > >>>>>>>>> Cheers, > >>>>>>>>> Orson > >>>>>>>>> > >>>>>>>>> On 03/07/2017 02:36 PM, Tomasz Wlostowski wrote: > >>>>>>>>>> Hi, > >>>>>>>>>> > >>>>>>>>>> The attached patch removes boost::context dependency by > >>>>>>>>>> introducing a > >>>>>>>>>> single-file libcontext that automatically detects the compiler & > >>>>>>>>>> platform and provides a stable API, contrary to the Boost libs. If > >>>>>>>>>> you > >>>>>>>>>> have some spare time, please test it, in particular on Windows and > >>>>>>>>>> OSX. > >>>>>>>>>> > >>>>>>>>>> I verified the library (outside Kicad) on > >>>>>>>>>> Win32/Win64/Linux-i386/Linux-x86/64, OSX/x86_64, Linux/ARM and > >>>>>>>>>> Linux/Aarch64. Compared to boost, there is no support for Sparc > >>>>>>>>>> and PPC > >>>>>>>>>> platforms. If anyone here pops up willing to test the Sparc/PPC > >>>>>>>>>> support, > >>>>>>>>>> I can add it. > >>>>>>>>>> > >>>>>>>>>> I hope this will sort out the boost issues for good. > >>>>>>>>>> > >>>>>>>>>> Cheers, > >>>>>>>>>> Tom > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> _______________________________________________ > >>>>>>>>>> Mailing list: https://launchpad.net/~kicad-developers > >>>>>>>>>> Post to : kicad-developers@lists.launchpad.net > >>>>>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers > >>>>>>>>>> More help : https://help.launchpad.net/ListHelp > >>>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> _______________________________________________ > >>>>>>>>> Mailing list: https://launchpad.net/~kicad-developers > >>>>>>>>> Post to : kicad-developers@lists.launchpad.net > >>>>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers > >>>>>>>>> More help : https://help.launchpad.net/ListHelp > >>>>>>>>> > >>>>>>>> > >>>>>>>> _______________________________________________ > >>>>>>>> Mailing list: https://launchpad.net/~kicad-developers > >>>>>>>> Post to : kicad-developers@lists.launchpad.net > >>>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers > >>>>>>>> More help : https://help.launchpad.net/ListHelp > >>>>> > >>>>> _______________________________________________ > >>>>> Mailing list: https://launchpad.net/~kicad-developers > >>>>> Post to : kicad-developers@lists.launchpad.net > >>>>> Unsubscribe : https://launchpad.net/~kicad-developers > >>>>> More help : https://help.launchpad.net/ListHelp > >>>>> > >>>> > >>>> > >>> > >>> > >>> > >> > >> > > > > > > > > _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp