Skip to content
  • Christopher Subich's avatar
    Sanitize template instantiation for add_diagnostic · 9d36be1d
    Christopher Subich authored and Christopher Subich's avatar Christopher Subich committed
    The template form of add_diagnostic<x> is attractive, but to
    be properly used the template implementation must be visible
    at the same time as the header file itself.  The
    instantiations formerly in BaseCase.cpp were not likely to
    be visible to a program, increasing compile time (if they
    were re-instantiated) or causing an error (if the
    implementation was not visible).  This change:
    
    *) Moves the implementation of add_diagnostic to a new
    BaseCase_impl.cc
    *) Includes this impementation file from BaseCase.hpp, with
    a double-inclusion guard
    *) Preserves instantiations of <double> and <int>, with new
    'extern' declarations in BaseCase.hpp to prevent
    double-definition.
    9d36be1d