What is the clean way to include an ISR in a library?

DuaneB:
either the pinchangeint library or the servo library both of these are well used class based libraries that include ISRs.

Pinchange and software serial cannot be used together because they both have link-time definitions of how they want PCINT0..PCINT3 vectors set up. There are other similar interrupt vector collisions in different libraries. Pinchangeint does let you have compile time control of which vectors it takes over -- if you know. But software serial just uses them all.

SoftwaeeSerial.cpp

#if defined(PCINT0_vect)
ISR(PCINT0_vect)
{
  SoftwareSerial::handle_interrupt();
}
#endif

#if defined(PCINT1_vect)
ISR(PCINT1_vect)
{
  SoftwareSerial::handle_interrupt();
}
#endif

#if defined(PCINT2_vect)
ISR(PCINT2_vect)
{
  SoftwareSerial::handle_interrupt();
}
#endif

#if defined(PCINT3_vect)
ISR(PCINT3_vect)
{
  SoftwareSerial::handle_interrupt();
}
#endif

PinChangeInt.h

#ifndef NO_PORTB_PINCHANGES
ISR(PCINT0_vect) {
	PCintPort::curr = portB.portInputReg; // version 1.6
	portB.PCint();
}
#endif

#ifndef NO_PORTC_PINCHANGES
ISR(PCINT1_vect) {
	PCintPort::curr = portC.portInputReg; // version 1.6
	portC.PCint();
}
#endif

#ifndef NO_PORTD_PINCHANGES
ISR(PCINT2_vect){ 
	PCintPort::curr = portD.portInputReg; // version 1.6
	portD.PCint();
}
#endif

At least PinChangeInt let's you strategically define NO_PORTx_PINCHANGES, if you need it to leave some vector alone. SoftwareSerial is not so friendly.

My advise is that, if you need to define a handler for one of the interrupts that "attachInterrupt()" doesn't know about, then please
(1) document the dependency on what interrupt vectors you want, and
(2) provide a means, as does pinchangeint library to give you some compile time control.

What might be really cool would be to have the wiring foundation extended to provide run-time controllable vectors for all the interrupts somehow.